3 ms·
That's more like small/large than easy/hard.
by pps43 8y ago
That's more like small/large than easy/hard.
- pmiller2 8y agoThe key word here is “optimal.” These aren’t difficult tasks if you can just write down the straightforward code to do them.
- akhilcacharya 8y agoI'd argue finding the next permutation is actually very difficult if you don't know the standard algorithm.