LeetCode solutions explanation JavaScript. Problem #20 - Valid Parentheses

preview_player
Показать описание
Approach 1: Stack
Runtime: 68 ms, faster than 63.33% of JavaScript online submissions for Valid Parentheses.
Memory Usage: 32.8 MB, less than 99.97% of JavaScript online submissions for Valid Parentheses.

Approach 1: Stack - optimized stack
Runtime: 64 ms, faster than 73.84% of JavaScript online submissions for Valid Parentheses.
Memory Usage: 33.2 MB, less than 99.06% of JavaScript online submissions for Valid Parentheses.

Approach 2: ReqExp
Runtime: 84 ms, faster than 21.28% of JavaScript online submissions for Valid Parentheses.
Memory Usage: 39.4 MB, less than 6.98% of JavaScript online submissions for Valid Parentheses.

Let's be friends:

#leetcode #interview
Рекомендации по теме