3 ms·
I instantly knew, with no pre-knowledge, of two of the sub-optimal solutions presented in this thread that require O(n) storage. The optimal one, no but I didn
by SixSigma 12y ago
I instantly knew, with no pre-knowledge, of two of the sub-optimal solutions presented in this thread that require O(n) storage.
The optimal one, no but I didn't try any further than the solutions I had.