Sunday, July 28, 2019

Leetcode notes all in one

All the questions resolved can be found below, enjoy!


Bonus: The locked questions in Leetcode are labeled as "locked".

  1. Leetcode 23: Merge K Sorted Lists
  2. Leetcode 71: Simply Path
  3. Leetcode 76: Minimum Window Substring
  4. Leetcode 115: Distinct Subsequences
  5. Leetcode 133: Clone Graph
  6. Leetcode 146: LRU
  7. Leetcode 155: Min Stack
  8. Leetcode 156: Binary Tree Upside Down
  9. Leetcode 157: Read N Characters Given Read4
  10. Leetcode 158: Read N Characters Given Read4 II - Call multiple times
  11. Leetcode 188: Best Time to Buy and Sell Stock IV
  12. Leetcode 239: Sliding Window Maximum
  13. Leetcode 241: Different Ways to Add Parentheses
  14. Leetcode 248: Strobogrammatic Number III
  15. Leetcode 249: Group Shifted String
  16. Leetcode 253: Meeting Rooms II
  17. Leetcode 257: Binary Tree Paths
  18. Leetcode 264: Ugly Number II
  19. Leetcode 276: Paint Fence
  20. Leetcode 277: Find the Celebrity
  21. Leetcode 309: Best Time to Buy and Sell Stock with Cooldown
  22. Leetcode 312: Burst Balloons
  23. Leetcode 316: Remove Duplicate Letters
  24. Leetcode 321: Create Maximum Number
  25. Leetcode 325: Maximum Size Subarray Sum Equals K
  26. Leetcode 335: Self-Crossing
  27. Leetcode 341: Flatten Nested List Iterator
  28. Leetcode 358: Rearrange String K Distance Apart
  29. Leetcode 380: Insert Delete GetRandom O(1)
  30. Leetcode 381: Insert Delete GetRandom O(1) - Duplicates Allowed
  31. Leetcode 392: Is Subsequence
  32. Leetcode  395: Longest Substring with At Least K Repeating Characters
  33. Leetcode 416: Partition Equal Subset Sum
  34. Leetcode 421: Maximum XOR of Two Numbers in an Array
  35. Leetcode 430: Flatten a Multilevel Doubly Linked List
  36. Leetcode 432: All O'one Data Structure
  37. Leetcode 460: LFU Cache
  38. Leetcode 474: Ones and Zeroes
  39. Leetcode 478: Generate Random Point in a Circle
  40. Leetcode 480: Sliding Window Medians
  41. Leetcode 508: Most Frequent Subtree Sum
  42. Leetcode 514: Freedom Trail
  43. Leetcode 525: Contiguous Array
  44. Leetcode 526: Beautiful Arrangement
  45. Leetcode 562: Longest Line of Consecutive One in Matrix
  46. Leetcode 621: Task Scheduler
  47. Leetcode 622: Design Circular Queue
  48. Leetcode 629: K Pairs Inverse Array
  49. Leetcode 630: Course Schedule III
  50. Leetcode 638: Shopping Offers
  51. Leetcode 641: Design Circular Deque
  52. Leetcode 647: Palindromic Substrings
  53. Leetcode 650: 2 Keys Keyboard
  54. Leetcode 651: 4 Keys Keyboard
  55. Leetcode 673: Number of the Longest Increasing Subsequence
  56. Leetcode 679: 24 Game
  57. Leetcode 698: Partition to K Equal Sum Subsets
  58. Leetcode 727: Minimum Window Subsequence
  59. Leetcode 730: Counting Different Palindromic Subsequences
  60. Leetcode 756: Pyramid Transition Matrix
  61. Leetcode 778: Swim in Rising Water
  62. Leetcode 781: Rabbits in the Forest
  63. Leetcode 792: Number of Matching Subsequences
  64. Leetcode 801: Minimum Swaps to Make Sequences Increasing
  65. Leetcode 813: Largest Sum of Averages
  66. Leetcode 828: Unique Letter String
  67. Leetcode 839: Similar String Groups
  68. Leetcode 850: Rectangle Area II
  69. Leetcode 872: Making a Large Island
  70. Leetcode 874: Walking Robot Simulation
  71. Leetcode 907: Sum of Subarray Minimums
  72. Leetcode 910: Smallest Range II
  73. Leetcode 912: Best Meeting Point
  74. Leetcode 920: Number of Music Playlists
  75. Leetcode 947: Most Stones Removed With Same Rows or Column
  76. Leetcode 950: Reveal Cards In Increasing Order
  77. Leetcode 952: Largest Component Size by Common Factor
  78. Leetcode 970: Powerful Integer
  79. Leetcode 979: Distribute Coins in Binary Tree
  80. Leetcode 981: Time Based Key-Value Store
  81. Leetcode 992: Subarrays with K Different Integers
  82. Leetcode 1055: Shortest Way to Form String
  83. Leetcode 1057: Campus Bikes
  84. Leetcode 1066: Campus Bikes II
  85. Leetcode 1072: Flip Columns to Maximum Number of Equal Rows 
  86. Leetcode 1081: Smallest Subsequence with Distinct Characters
  87. Leetcode 1088: Confusing Number II
  88. Leetcode 1104: Path In ZigZag Labelled Binary Tree
  89. Leetcode 1135: Connecting Cities With Minimum Cost
  90. Leetcode 1140: Stone Game II
  91. Leetcode 1142: Flowers Planting With No Adjacent
  92. Leetcode 1144: Decrease Elements To Make Array Zigzag
  93. Leetcode 1145: Binary Tree Coloring Game
  94. Leetcode 1146: Snapshot Array
  95. Leetcode 1147: Longest Chunked Palindrome Decomposition
  96. Leetcode 1152: Analyze User Website Visit Pattern
  97. Leetcode 1153: String Transforms To Another String
  98. Leetcode 1167: Minimum Cost to Connect Sticks
  99. Leetcode 1168: Optimize Water Distribution in a Village
  100. Leetcode 1178: Number of Valid Words for Each Puzzle
  101. Leetcode 1183: Maximum Number of Ones
  102. Leetcode 1186: Maximum Subarray Sum with One Deletion
  103. Leetcode 1187: Make Array Strictly Increasing
  104. Leetcode 1199: Minimum Time to Build Blocks
  105. Leetcode 1202: Smallest Strings with Swaps
  106. Leetcode 1203: Sort Items by Groups Respecting Dependencies
  107. Leetcode 1210: Minimum Moves to Reach Target with Rotations
  108. Leetcode 1216: Valid Palindrome III
  109. Leetcode 1224: Maximum Equal Frequency
  110. Leetcode 1230: Toss Strange Coins
  111. Leetcode 1234: Replace the Substring for Balanced String
  112. Leetcode 1235: Maximum Profit in Job Scheduling
  113. Leetcode 1245: Tree Diameter
  114. Leetcode 1246: Palindrome Removal
  115. Leetcode 1254: Number of Closed Islands
  116. Leetcode 1255: Maximum Score Word Formed by Letters
  117. Leetcode 1256: Encode Number
  118. Leetcode 1257: Smallest Common Region
  119. Leetcode 1258: Synonymous Sentences
  120. Leetcode 1259: Handshakes That Don't Cross
  121. Leetcode 1268: Search Suggestions System
  122. Leetcode 1269: Number of Ways to Stay in the Same Place After Some Steps
  123. Leetcode 1273: Delete Tree Nodes
  124. Leetcode 1277: Count Square Submatrices with All Ones
  125. Leetcode 1278: Palindrome Partitioning III
  126. Leetcode 1282: Group the People Given the Group Size They Belong To 
  127. Leetcode 1283: Find the Smallest Divisor Given a Threshold
  128. Leetcode 1284: Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
  129. Leetcode 1300: Sum of Mutated Array Closest to Target
  130. Leetcode 1301: Number of Paths with Max Score
  131. Leetcode 1339: Maximum Product of Splitted Binary Tree
  132. Leetcode 1371: Find the Longest Substring Containing Vowels in Even Counts 
  133. Leetcode 1400: Construct K Palindrome Strings
  134. Leetcode 1419: Minimum Number of Frogs Croaking
  135. Leetcode 1448: Count Good Nodes in Binary Tree
  136. Leetcode 1449: Form the Largest Integer with Digits that Add up to Target
  137. Leetcode 1531: String Compression II
  138. Leetcode 1542: Find Longest Awesome Substring
  139. Leetcode 1547: Minimum Cost to Cut a Stick
  140. Leetcode 1558: Minimum Numbers of Function Calls to Make Target Array 
  141. Leetcode 1559: Detect Cycles in 2D Grid 
  142. Leetcode 1562: Find the Latest Group with Size of M
  143. Leetcode 1567: Maximum Length of Subarray With Positive Product
  144. Leetcode 1569: Number of Ways to Reorder Array to Get Same BST
  145. Leetcode 1579: Remove Max Number of Edges to Keep Graph fully Traversable
  146. Leetcode 1584: Minimum Cost to Connect All Points
  147. Leetcode 1585: Check If String Is Transformable With Substring Sorting Operations
  148. Leetcode 1980: Find Unique Binary String
  149. Leetcode 1981: Minimize the Difference Between Target and Chosen Elements
  150. Leetcode 2104: Sum of Subarray Ranges

No comments:

Post a Comment