# LeetCode Longest Consecutive Sequence: Hashing the Boundary

LeetCode Longest Consecutive Sequence: use a hash table to associate the boundary value with the, for each v, we check v + 1 and v - 1 in constant time.

# LeetCode Sum Root to Leaf Numbers: DFS and BFS

Both DFS and BFS could be used to solve LeetCode Sum Root to Leaf Numbers problem, elaboration of the details are discussed here.

# LeetCode Unique Paths I and II: DP with Memory Optimization

LeetCode Unique Paths I and II could be solved by dynamic programming with memory optimization. We can treat problem I as a combinations problem as well.

# LeetCode Valid Palindrome: O(N) Time and O(1) Space with Two Pointers

LeetCode Valid Palindrome: It could be solved in O(N) Time and O(1) Space with Two Pointers to scan the characters from both end and compare the characters.

# LeetCode Triangle: DP and Exactly N Extra Memory

Dynamic Programming (DP) could solve this LeetCode Triangle Problem elegantly with 10 lines of code. The space const an int array of size n and that's it!