this problem have hash table tag. How to solve it using hash table?
same question here
Same question here. Also DP+Stack solution is already linear.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.