9. Palindrome Number | check case related to 0 and smaller 10, find reverted_number - multiply 10 and 10 and 10 ... but need to compare only half (for odd or even, handle the return) |
26. Remove Duplicates from Sorted Array | starting from k=1 and check curr nums[i] with previous nums[k] |
27. Remove Element | nums[count] and nums[i] |
118. Pascal's Triangle | 2 loops, 2nd for's index starts from 1 |
121. Best Time to Buy and Sell Stock | minPrice and maxProfit, find the profit for each |
169. Majority Element | count and balance the appearance to at least 0, change to new number once they're back |
217. Contains Duplicate | sorting, check i-1 vs i or using set |
242. Valid Anagram | hasmap with get, how to check character in s has the same frequency to t (different order) |
303. Range Sum Query - Immutable | prefix |
448. Find All Numbers Disappeared in an Array | negate value for existing number, positive value is the missing one |
605. Can Place Flowers | top solution, count consecutive empty (you know, we need 3 5 7) and check the empty is larger than 0, check the edge case (probably first and last element) |
724. Find Pivot Index | find sum_left and sum_right |