I tried many ways to implement this with 1 or 2 stacks, the time is always around 100ms. Some shared solutions just make the codes more clear.
But there is some amazingly fast solutions shown in the detialed results.
Can anyone share me with one of that?
Thanks so much!!!
A java learner.