LeetCode 14 Longest Common Prefix
https://leetcode.com/problems/longest-common-prefix/
It means we can compare the first two elements and find the longest prefix, then we use it to compare next.
LeetCode 20 Valid Parentheses
https://leetcode.com/problems/valid-parentheses/
One solution is like this, quite simple and smart
Another Solution which use stack may more efficiently