Linked Questions
22 questions linked to/from Can a Trie be implemented efficiently?
608 votes
19 answers
161k views
Where can I find examples of good Mathematica programming practice?
I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
140 votes
8 answers
9k views
Can one identify the design patterns of Mathematica?
... or are they unnecessary in such a high-level language? I've been thinking about programming style, coding standards and the like quite a bit lately, the result of my current work on a mixed .Net/...
38 votes
8 answers
4k views
Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$
Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$. Looks like a question for pupils, right? In fact, if the available math symbols are limited to addition ($+$), ...
65 votes
2 answers
11k views
How can I use Mathematica's graph functions to cheat at Boggle?
Boggle is a word game played with 16 dice and a 4x4 tray. This question is inspired by a Stack Overflow question about Boggle that I decided to solve using Mathematica. In addition to Mathematica, I ...
29 votes
8 answers
2k views
Splitting words into specific fragments
I am looking into splitting words into a succession of chemical elements symbols, where possible. For example: Titanic = Ti Ta Ni C (titanium, tantalum, nickel, carbon) A word may or may not be ...
18 votes
6 answers
2k views
Split a string at specific positions
Given a string of alphanumerical characters, how to split it simply and quickly at the center of continuous letter-substrings? Is there an elegant and fast solutions out there in the "computational ...
20 votes
3 answers
12k views
Implementing a dictionary data structure
As one learns from a course on data structures, hash maps or dictionaries can be efficient when applied to appropriate tasks. I need a hash map in Mathematica and I've never found it. I'm scratching ...
13 votes
5 answers
1k views
Building a tree
Given a list of word characters, such as this one, I'd like to build a tree, similar to this makeTree function, but with the tree in a different format. So, for an input such as ...
17 votes
3 answers
1k views
Visualizing directories
How do I plot the content of a directory and all its subdirectories into infinity using TreeForm? I've tried using a mix of ...
16 votes
3 answers
2k views
How to plot layered graphs?
Given a directed acyclic graph, there is always a possibility to plot the graph as layers, where nodes always send edges into one direction (usually down), to successive layers, and never backwards. ...
11 votes
4 answers
688 views
Handy / flexible directory tree operations
Is there any shorter / more handy / more flexible way to get directory tree as a nested Rules/Associations list? I tried to incorporate ...
10 votes
2 answers
635 views
Cases[data,Colon[key,_]] vs. Cases[data,key:_] toward XPath, XQuery
Exploring methods to index and search tree-structured key:value pairs via named-entity index (key paths) as opposed to Position-based indexing. Using Rule as ...
15 votes
1 answer
2k views
How to use classical data structure in Mathematica
As a C programmer, I have used Mathematica for a month. In this process, I discovered that some problems cannot be solved via the built-ins, owing to lacking of data structure like ...
6 votes
4 answers
540 views
How can I create an Association from a multidimensional list of values and a list of keys?
Given a list of values such as vals = {{{{0., 633.25}, {642.96, 677.34}}, {{591.56, 632.45}, {634.9, 715.6}}}} and a list of "Dimensions" such as ...
7 votes
5 answers
377 views
Nested list from a flat folder list
I have a list of folders and files in my current working directory as a result of a built-in function FileNames: FileNames["*", "", Infinity]]. ...