# Tag Info

Accepted

### Association vs Pair - Creation performance, Selection performance

Simply use keys = Range[1000000]; vals = Range[1000000]^2; result = Pick[vals, PrimeQ[keys]]; to get the best of both worlds (zero construction cost and even ...
• 94.6k
Accepted

• 14.1k

### Sorting a list of "Low", "Medium", "High" into low, medium, high

Permute[SortBy[Gather[list],First], Cycles[{{2,1,3}}]]//Flatten where ...
• 10.2k

### How to pick lists to satisfy a given form?

Not sure if this kind of answer is appropriate on this forum. There are many assumptions baked in, and it might be hard to modify if those assumptions are wrong. It also seems more complicated that ...
• 3,452
1 vote
Accepted

### Create a Table with 3 different variables from 2 Lists and 1 Table

Let's assume that the x-coordinates are in a list called xs. Similarly for a list called ys. Let's say ...
• 3,452
1 vote

### Modify list elements if last two entries are equal

If your data is always a list of lists and you always want the transformation performed at that second level, then this works (I've named your data theData): ...
• 3,452
1 vote

### Modify list elements if last two entries are equal

Another way: ...
• 3,648

Only top scored, non community-wiki answers of a minimum length are eligible