My solutions for LeetCode problems
I add the solutions to the problems that are better than leetcode solution in execution time and those which there are no leetcode solutions.
1. Two Sum [easy, Hash Table]
14. Longest Common Prefix [easy, Binary search]
70. Climbing Stairs [Recursion, Dynamic Programming, Fibonacci]
100. Same Tree [easy, Recursion]
101. Symmetric Tree [easy, Recursive, Iterative]
130. Surrounded Regions
200. Number of Islands
226. Invert Binary Tree [easy, Recursive]
235. Lowest Common Ancestor of a Binary Search Tree [easy, Recursive, Iterative]
403. Frog Jump
509. Fibonacci Number [easy, Recursion]
538. Convert BST to Greater Tree [easy, Recursion, Stack, reverse Morris traversal]
563. Binary Tree Tilt [easy, Recursion]
572. Subtree of Another Tree [easy, Traversal]
617. Merge Two Binary Trees [easy, Recursion, Iterative]
637. Average of Levels in Binary Tree [easy, DFS, BFS]
653. Two Sum IV [easy, HashSet, BFS, BST]
669. Trim a Binary Search Tree [easy, Recursion]
671. Second Minimum Node In a Binary Tree [easy, DFS]
682. Baseball Game [easy, Stack]
687. Longest Univalue Path [easy, Recursion]
690. Employee Importance [easy, DFS]
696. Count Binary Substrings [easy, Linear Scan]
704. Binary Search [easy, Binary Search]
716. Max Stack [easy, TreeMap]
720. Longest Word In Dictionary [easy, DFS]
733. Flood Fill [easy, DFS]
744. Find Smallest Letter Greater Than Target [easy, Linear Scan, Binary Search]
747. Largest Number At Least Twice of Others [easy, Linear Scan]
796. Rotate String [easy, KMP]
804. Unique Morse Code Words [easy, HashSet]
811. Subdomain Visit Count [easy, HashMap]
827. Making A Large Island [Hard, DFS]
852. Peak Index in a Mountain Array [easy, binary search]
872. Leaf-Similar Trees [easy, DFS]
872. Leaf-Similar Trees [easy, DFS]
897. Increasing Order Search Tree [medium, Traversal]
938. Range Sum of BST [easy, DFS]
965. Univalued Binary Tree [easy, DFS, Recursion]
993. Cousins in Binary Tree [easy, DFS]
994. Rotting Oranges [easy, BFS]
1222. Queens That Can Attack the King