Click here to see the full article post
I hope LeetCode should do some video solution instead of text, which hackerrank and geeksforgeeks are very good examples. As you know, sometimes the long text is boring to read.
"Approach #1 Using Stack [Time Limit Exceeded]" - looks misleading. The accepted solution is stack-based. Any approach can be misused. When you count using fingers instead of just adding/subtracting two numbers, you're doing just that - wasting time. You could have added Thread.Sleep(1000) as well.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.