Feeds
已解决
Next lexicographic - permutation
Find next lexicographic - permutation (permutations as it would occur in a dictionary order). E.g: nextP('ABCD') = ABDC If you...
10 hours 前
已解决
Put m balls into n boxes (again)
According to Cody Problem 1516, if I put 3 balls into 2 boxes then 1 1 1 1 1 2 1 2 2 ...
13 hours 前
已解决
Put m balls into n boxes
Can you find all the cases where, if I put 3 balls into 2 boxes the case is 1 1 1 1 1 2 1 ...
14 hours 前
已解决
Repopulate the City
For any population p of positive integers between pmin and pmax, we can calculate histogram count n for a list of evenly dividin...
1 day 前
已解决
NCHOOSEK - Time Optimization
Input V —— Set of all choices, a vector of N, 1 < N < 100 K —— Number of selected choices, a scalar, 0 <= K <= N Output C ——...
1 day 前
已解决
Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...
1 day 前
已解决
Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...
1 day 前
已解决
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...
1 day 前
已解决
Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.
1 day 前

