20. Valid Parentheses
Description
Intuition
这题目没啥特别的,就是有人在领英面试的时候被要求写个 Space O(1)的solution。
看了好多帖子,应该是C++ reuse string as stack 做到space O(1)
有几个疑似的帖子
- NO stack O(n) time , 0 space, string function.-time-O(1)-space-fastest-so-far)
- 这个
str::earse
应该不是O(1)
- 这个
- NO stack O(n) time , 0 space, string function.-time-0-space-string-function.)