949 Largest Time for Given Digits
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: 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
link: Number of Recent Calls Thought Question ask for numbers of calls in 3000. So sliding windows is my choice
link Knight Dialer Thought Since it ask how many distinct numbers could be generated, DP jumps to my mind immediately.