Questions tagged [challenge-community]
Use when many competing answers are expected in order to find the solution that performs better.
11 questions
5
votes
6
answers
699
views
How to efficiently select elements with the minimum value from a large list?
How can I efficiently select sublists with the minimum value of the third elmement from the following list?
...
2
votes
2
answers
81
views
Best way to extend the size and add terms to a SparseArray without expanding
Let's say I have a "small" SparseArray of any size, in the example $2\times2$
...
7
votes
4
answers
551
views
Optimal Solution for OddsBeforeEvens Wolfram Challenge
Odds before Evens
Given a list of integers, rearrange them so that all of the odd integers appear before all of the even integers, without otherwise changing the order.
An obvious solution is
...
7
votes
4
answers
525
views
Fill an empty matrix with the depth of its elements
Given an arbitrarily nested empty matrix like for example
mat =
{
{},
{{}, {}},
{{}, {{}}, {}},
{{}, {{}}, {}, {{{}}}}
};
and knowing that
...
10
votes
6
answers
442
views
Replacing consecutive empty sublists with their run-lengths
I have a list like this:
...
2
votes
2
answers
126
views
How to gather functions which intersect at the same point?
How to gather functions which intersect at the same point (real solution)?
func = {2 x, x^2 + 1, (x^3 + 3)/2};
For example, with the list of functions above I ...
2
votes
1
answer
169
views
How does Leafcount work? [closed]
I am curious about how LeafCount works because when I count the number of leaves in my solution to a Wolfram Challenge, I get a much smaller result than those listed on the leaderboard for Multiples ...
1
vote
0
answers
118
views
How to optimize Code for Wolfram Challenges? [closed]
I am wondering if anyone who has knowledge of optimizing programs in the Wolfram language has any advice on how to optimize the following quantities of programs written to solve Wolfram Challenges.
I ...
2
votes
0
answers
107
views
How to access submitted answers to Wolfram Challenges? [closed]
I've seen a lot of interesting questions in the Wolfram Challenges here, but I don't know how to look at some of their current best answered code.
I see a lot of participants providing a lot of fast ...
0
votes
1
answer
98
views
From a bag of n balls, with c colours, and d draws count how many variations are possible? [closed]
First, the objective is not to use formulas for combinations, or permutations.
The objective is to use loops(for, while, etc.) to make Mathematica count the number of possible variations/sequences of ...
12
votes
10
answers
1k
views
Elegant way to map a function to only the last element of each sublist [duplicate]
Suppose that I have the following list, called test:
test = {{{a1}, {a2, a3}}, {{b1}, {b2, b3}}, {{c1}, {c2, c3}}};
Now ...