Solutions to LeetCode Problems # Title 1 Two Sum 2 Add Two Numbers 3 Longest Substring Without Repeating Characters 7 Reverse Integer 9 Palindrome Number 11 Container With Most Water 12 Integer to Roman 13 Roman to Integer 14 Longest Common Prefix 20 Valid Parentheses 21 Merge Two Sorted Lists 24 Swap Nodes in Pairs 26 Remove Duplicates from Sorted Array 27 Remove Element 28 Implement strStr() 31 Next Permutation 33 Search in Rotated Sorted Array 35 Search Insert Position 38 Count and Say 41 First Missing Positive 46 Permutations 47 Permutations II 49 Group Anagrams 51 N-Queens 52 N-Queens II 53 Maximum Subarray 54 Spiral Matrix 55 Jump Game 56 Merge Intervals 58 Length of Last Word 64 Minimum Path Sum 66 Plus One 67 Add Binary 69 Sqrt(x) 70 Climbing Stairs 78 Subsets 80 Remove Duplicates from Sorted Array II 83 Remove Duplicates from Sorted List 88 Merge Sorted Array 89 Gray Code 90 Subsets II 94 Binary Tree Inorder Traversal 100 Same Tree 101 Symmetric Tree 102 Binary Tree Level Order Traversal 104 Maximum Depth of Binary Tree 105 Construct Binary Tree from Preorder and Inorder Traversal 106 Construct Binary Tree from Inorder and Postorder Traversal 107 Binary Tree Level Order Traversal II 108 Convert Sorted Array to Binary Search Tree 110 Balanced Binary Tree 111 Minimum Depth of Binary Tree 112 Path Sum 116 Populating Next Right Pointers in Each Node 118 Pascal's Triangle 119 Pascal's Triangle II 121 Best Time to Buy and Sell Stock 122 Best Time to Buy and Sell Stock II 124 Binary Tree Maximum Path Sum 125 Valid Palindrome 127 Word Ladder 136 Single Number 139 Word Break 141 Linked List Cycle 144 Binary Tree Preorder Traversal 145 Binary Tree Postorder Traversal 146 LRU Cache 150 Evaluate Reverse Polish Notation 155 Min Stack 153 Find Minimum in Rotated Sorted Array 160 Intersection of Two Linked Lists 167 Two Sum II - Input array is sorted 168 Excel Sheet Column Title 169 Majority Element 171 Excel Sheet Column Number 172 Factorial Trailing Zeroes 189 Rotate Array 190 Reverse Bits 191 Number of 1 Bits 198 House Robber 200 Number of Islands 201 Bitwise AND of Numbers Range 202 Happy Number 203 Remove Linked List Elements 204 Count Primes 205 Isomorphic Strings 206 Reverse Linked List 208 Implement Trie (Prefix Tree) 217 Contains Duplicate 219 Contains Duplicate II 221 Maximal Square 225 Implement Stack using Queues 226 Invert Binary Tree 228 Summary Ranges 230 Kth Smallest Element in a BST 231 Power of Two 232 Implement Queue using Stacks 234 Palindrome Linked List 235 Lowest Common Ancestor of a Binary Search Tree 237 Delete Node in a Linked List 238 Product of Array Except Self 242 Valid Anagram 257 Binary Tree Paths 258 Add Digits 263 Ugly Number 268 Missing Number 274 H-Index 278 First Bad Version 283 Move Zeroes 290 Word Pattern 292 Nim Game 299 Bulls and Cows 303 Range Sum Query - Immutable 309 Best Time to Buy and Sell Stock with Cooldown 322 Coin Change 326 Power of Three 328 Odd Even Linked List 338 Counting Bits 342 Power of Four 344 Reverse String 345 Reverse Vowels of a String 349 Intersection of Two Arrays 350 Intersection of Two Arrays II 354 Russian Doll Envelopes 367 Valid Perfect Square 374 Guess Number Higher or Lower 376 Wiggle Subsequence 383 Ransom Note 387 First Unique Character in a String 389 Find the Difference 392 Is Subsequence 394 Decode String 402 Remove K Digits 403 Frog Jump 404 Sum of Left Leaves 405 Convert a Number to Hexadecimal 409 Longest Palindrome 412 Fizz Buzz 414 Third Maximum Number 415 Add Strings 416 Partition Equal Subset Sum 417 Pacific Atlantic Water Flow 423 Reconstruct Original Digits from English 434 Number of Segments in a String 438 Find All Anagrams in a String 441 Arranging Coins 448 Find All Numbers Disappeared in an Array 451 Sort Characters By Frequency 455 Assign Cookies 459 Repeated Substring Pattern 461 Hamming Distance 463 Island Perimeter 476 Number Complement 478 Generate Random Point in a Circle 482 License Key Formatting 485 Max Consecutive Ones 492 Construct the Rectangle 495 Teemo Attacking 498 Diagonal Traverse 500 Keyboard Row 504 Base 7 506 Relative Ranks 507 Perfect Number 509 Fibonacci Number 520 Detect Capital 525 Contiguous Array 535 Encode and Decode TinyURL 540 Single Element in a Sorted Array 543 Diameter of Binary Tree 560 Subarray Sum Equals K 561 Array Partition 567 Permutation in String 575 Distribute Candies 623 Add One Row to Tree 637 Average of Levels in Binary Tree 643 Maximum Average Subarray I 645 Set Mismatch 647 Palindromic Substrings 678 Valid Parenthesis String 680 Valid Palindrome II 682 Baseball Game 697 Degree of an Array 700 Search in a Binary Search Tree 706 Design HashMap 709 To Lower Case 714 Best Time to Buy and Sell Stock with Transaction Fee 721 Accounts Merge 724 Find Pivot Index 728 Self Dividing Numbers 733 Flood Fill 747 Largest Number At Least Twice of Others 771 Jewels and Stones 775 Global and Local Inversions 820 Short Encoding of Words 823 Binary Trees With Factors 836 Rectangle Overlap 841 Keys and Rooms 844 Backspace String Compare 869 Reordered Power of 2 870 Advantage Shuffle 876 Middle of the Linked List 883 Projection Area of 3D Shapes 884 Uncommon Words from Two Sentences 886 Possible Bipartition 901 Online Stock Span 905 Sort Array By Parity 912 Sort an Array 916 Word Subsets 918 Maximum Sum Circular Subarray 923 3Sum With Multiplicity 935 Knight Dialer 938 Range Sum of BST 941 Valid Mountain Array 966 Vowel Spellchecker 971 Flip Binary Tree To Match Preorder Traversal 977 Squares of a Sorted Array 979 Distribute Coins in Binary Tree 984 String Without AAA or BBB 993 Cousins in Binary Tree 997 Find the Town Judge 1008 Construct Binary Search Tree from Preorder Traversal 1009 Complement of Base 10 Integer 1046 Last Stone Weight 1089 Duplicate Zeros 1051 Height Checker 1143 Longest Common Subsequence 1207 Unique Number of Occurrences 1232 Check If It Is a Straight Line 1277 Count Square Submatrices with All Ones 1295 Find Numbers with Even Number of Digits 1332 Remove Palindromic Subsequences 1386 Cinema Seat Allocation 1394 Find Lucky Integer in an Array 1396 Design Underground System 1426 Counting Elements 1427 Perform String Shifts 1428 Leftmost Column with at Least a One 1429 First Unique Number 1430 Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree 1461 Check If a String Contains All Binary Codes of Size K 1572 Matrix Diagonal Sum 1672 Richest Customer Wealth 1721 Swapping Nodes in a Linked List 1807 Evaluate the Bracket Pairs of a String 1971 Find if Path Exists in Graph 2215 Find the Difference of Two Arrays 2225 Find Players With Zero or One Losses Problems solved: 247