951 Flip Equivalent Binary Trees
Link: https://leetcode.com/problems/flip-equivalent-binary-trees/ Thought If 2 nodes are equivalent, either their left and right side match, or they are flipped match. So […]
Link: https://leetcode.com/problems/flip-equivalent-binary-trees/ Thought If 2 nodes are equivalent, either their left and right side match, or they are flipped match. So […]
link: https://leetcode.com/problems/reveal-cards-in-increasing-order/ Thought So the rule is if you pop anything from front, then you shall move next head to tail.
link: https://leetcode.com/problems/largest-time-for-given-digits/ Thought Its easy to think use DFS to solve it: it has limit data(4 digits), and DFS will enumerates
Link: Most Stones Removed with Same Row or Column Thought When I saw the question, I realized its a Union Find
Link: validate stack sequences Thought Its pretty straight forward, just stimulate a stack and push/pop as the sequence shows. Code
Link: Bag of Tokens Thought For this question, I find we could do 2 things: spend any cost form the
Link Minimum Increment to Make Array Unique Thought Firstly, I try to enumerate all existing number, and I got TLE
link: Minimum Area Rectangle Thought I plan to use sweep line to solve. Firstly I put a dictionary with x-val
link: Range Sum of BST Thought When first saw this question, I think using tree traverse could solve it and
link Distinct Subsequences II Thought The very first thought here is use DFS to find all distinct subsequences. However it