OK, I used a stack to solve the question, but this is much better since it requires only O(1) of extra space! Kudos!
what does "My Test" test?
My code is within 8 lines, without using custom functions, uses one "Select".
Just can't get part passed.
Greate variable naming! I was able to understand the code easily!
This is just a mindblower...
And also an O(n) solution unlike the highest rated one, which is O(n log n)
O(n log n)
Wanted to mark it as clever but the readability of the code won me over so marked it as Best Practices.
misionEnd < = Good naming convention!
This is the most clever answer I've ever seen...
I see why it throws this exception. Output is sometimes bigger than the int.max. need to change the last charcter to 1 or 0