Releases: ecgan/leetcode
Solutions for Biweekly Contest 36 and Weekly Contest 209
Solutions for Biweekly Contest 36:
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
1603 | Design Parking System | Easy | Design |
1604 | Alert Using Same Key-Card Three or More Times in a One Hour Period | Medium | String, Ordered Map |
Solutions for Weekly Contest 209:
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
1608 | Special Array With X Elements Greater Than or Equal X | Easy | Array |
1609 | Even Odd Tree | Medium | Tree |
Solutions for Biweekly Contest 34 and Weekly Contest 205
Solutions for Biweekly Contest 34:
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
1572 | Matrix Diagonal Sum | Easy | Array |
1574 | Shortest Subarray to be Removed to Make Array Sorted | Medium | Array, Binary Search |
Solutions for Weekly Contest 205:
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
1576 | Replace All ?'s to Avoid Consecutive Repeating Characters | Easy | String |
1577 | Number of Ways Where Square of Number Is Equal to Product of Two Numbers | Medium | Hash Table, Math |
1578 | Minimum Deletion Cost to Avoid Repeating Letters | Medium | Greedy |
Fix link to Day of the Year problem
Apparently the name of the problem Ordinal Number of Date has been changed to Day of the Year. This release updates the problem name and the link in readme.
Also updated codecov package to address package vulnerability.
Solutions for June LeetCoding Challenge
This release contains solutions for June LeetCoding Challenge.
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
35 | Search Insert Position | Easy | Array, binary search |
60 | Permutation Sequence | Medium | Math, Backtracking |
62 | Unique Paths | Medium | Array, Dynamic Programming |
75 | Sort Colors | Medium | Array, Two Pointers, Sort |
96 | Unique Binary Search Trees | Medium | Dynamic Programming, Tree |
129 | Sum Root to Leaf Numbers | Medium | Tree, Depth-first Search |
130 | Surrounded Regions | Medium | Depth-first Search, Breadth-first Search, Union Find |
137 | Single Number II | Medium | Bit Manipulation |
212 | Word Search II | Hard | Backtracking, Trie |
222 | Count Complete Tree Nodes | Medium | Binary Search, Tree |
226 | Invert Binary Tree | Easy | Tree |
231 | Power of Two | Easy | Math, Bit Manipulation |
237 | Delete Node in a Linked List | Easy | Linked List |
275 | H-Index II | Medium | Binary Search |
279 | Perfect Squares | Medium | Math, Dynamic Programming, Breadth-first Search |
287 | Find the Duplicate Number | Medium | Array, Two Pointers, Binary Search |
332 | Reconstruct Itinerary | Medium | Depth-first Search, Graph |
344 | Reverse String | Easy | Two Pointers, String |
368 | Largest Divisible Subset | Medium | Math, Dynamic Programming |
380 | Insert Delete GetRandom O(1) | Medium | Array, Hash Table, Design |
392 | Is Subsequence | Easy | Binary Search, Dynamic Programming, Greedy |
406 | Queue Reconstruction by Height | Medium | Greedy |
518 | Coin Change 2 | Medium | - |
528 | Random Pick with Weight | Medium | Binary Search, Random |
700 | Search in a Binary Search Tree | Easy | Tree |
714 | Dungeon Game | Hard | Binary Search, Dynamic Programming |
787 | Cheapest Flights Within K Stops | Medium | Dynamic Programming, Heap, Breadth-first Search |
1029 | Two City Scheduling | Easy | Greedy |
1044 | Longest Duplicate Substring | Hard | Hash Table, Binary Search |
1491 | Average Salary Excluding the Minimum and Maximum Salary | Easy | Array, Sort |
Biweekly Contest 29
Solution for Biweekly Contest 29:
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
1491 | Average Salary Excluding the Minimum and Maximum Salary | Easy | Array, Sort |
1492 | The kth Factor of n | Medium | Math |
1493 | Longest Subarray of 1's After Deleting One Element | Medium | Array |
Biweekly Contest 28 and Weekly Contest 193
Solution for Biweekly Contest 28:
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
1475 | Final Prices With a Special Discount in a Shop | Easy | Array |
1476 | Subrectangle Queries | Medium | Array |
Solution for Weekly Contest 193:
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
1480 | Running Sum of 1d Array | Easy | Array |
1481 | Least Number of Unique Integers after K Removals | Medium | Array, Sort |
Solutions for May LeetCoding Challenge
This release contains solutions for May LeetCoding Challenge.
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
72 | Edit Distance | Hard | String, Dynamic Programming |
169 | Majority Element | Easy | Array, Divide and Conquer, Bit Manipulation |
207 | Course Schedule | Medium | Depth-first Search, Breadth-first Search, Graph, Topological Sort |
208 | Implement Trie (Prefix Tree) | Medium | Design, Trie |
230 | Kth Smallest Element in a BST | Medium | Binary Search, Tree |
278 | First Bad Version | Easy | Binary Search |
328 | Odd Even Linked List | Medium | Linked List |
338 | Counting Bits | Medium | Dynamic Programming, Bit Manipulation |
367 | Valid Perfect Square | Easy | Math, Binary Search |
383 | Ransom Note | Easy | String |
387 | First Unique Character in a String | Easy | Hash Table, String |
402 | Remove K Digits | Medium | Stack, Greedy |
438 | Find All Anagrams in a String | Medium | Hash Table |
451 | Sort Characters By Frequency | Medium | Hash Table, Heap |
476 | Number Complement | Easy | Bit Manipulation |
525 | Contiguous Array | Medium | Hash Table |
540 | Single Element in a Sorted Array | Medium | - |
567 | Permutation in String | Medium | Two Pointers, Sliding Window |
733 | Flood Fill | Easy | Depth-first Search |
771 | Jewels and Stones | Easy | Hash Table |
886 | Possible Bipartition | Medium | Depth-first Search |
901 | Online Stock Span | Medium | Stack |
918 | Maximum Sum Circular Subarray | Medium | Array |
973 | K Closest Points to Origin | Medium | Divide and Conquer, Heap, Sort |
986 | Interval List Intersections | Medium | Two Pointers |
993 | Cousins in Binary Tree | Easy | Tree, Breadth-first Search |
997 | Find the Town Judge | Easy | Graph |
1035 | Uncrossed Lines | Medium | Array |
1008 | Construct Binary Search Tree from Preorder Traversal | Medium | Tree |
1232 | Check If It Is a Straight Line | Easy | Array, Math, Geometry |
1277 | Count Square Submatrices with All Ones | Medium | Array, Dynamic Programming |
Solutions for 30-Day LeetCoding Challenge
This release contains solutions for 30-Day LeetCoding Challenge.
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
33 | Search in Rotated Sorted Array | Medium | Array, Binary Search |
49 | Group Anagrams | Medium | Hash Table, String |
53 | Maximum Subarray | Easy | Array, Divide and Conquer, Dynamic Programming |
55 | Jump Game | Medium | Array, Greedy |
64 | Minimum Path Sum | Medium | Array, Dynamic Programming |
122 | Best Time to Buy and Sell Stock II | Easy | Array, Greedy |
124 | Binary Tree Maximum Path Sum | Hard | Tree, Depth-first Search |
136 | Single Number | Easy | Hash table, bit manipulation |
146 | LRU Cache | Medium | Design |
155 | Min Stack | Easy | Stack, Design |
200 | Number of Islands | Medium | Depth-first Search, Breadth-first Search, Union Find |
201 | Bitwise AND of Numbers Range | Medium | Bit Manipulation |
202 | Happy Number | Easy | Hash Table, Math |
221 | Maximal Square | Medium | Dynamic Programming |
238 | Product of Array Except Self | Medium | Array |
283 | Move Zeroes | Easy | Array, Two Pointers |
525 | Contiguous Array | Medium | Hash Table |
543 | Diameter of Binary Tree | Easy | Tree |
560 | Subarray Sum Equals K | Medium | Array, Hash Table |
678 | Valid Parenthesis String | Medium | String |
844 | Backspace String Compare | Easy | Two Pointers, Stack |
876 | Middle of the Linked List | Easy | Linked List |
1008 | Construct Binary Search Tree from Preorder Traversal | Medium | Tree |
1046 | Last Stone Weight | Easy | Heap, Greedy |
1143 | Longest Common Subsequence | Medium | Dynamic Programming |
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 | - | - |
New Solutions for Biweekly Contest 24 and Weekly Contest 185
This release contains the following new solutions from Biweekly Contest 24 and Weekly Contest 185:
LeetCode # | Title | Difficulty | Topics |
---|---|---|---|
1413 | Minimum Value to Get Positive Step by Step Sum | Easy | Array |
1417 | Reformat The String | Easy | String |
1418 | Display Table of Food Orders in a Restaurant | Medium | Hash Table |
1419 | Minimum Number of Frogs Croaking | Medium | String |
New Solutions for Dynamic Programming Questions (Easy)
This release contains solutions for Dynamic Programming questions with Easy difficulty:
- #53 Maximum Subarray
- #70 Climbing Stairs
- #121 Best Time to Buy and Sell Stock
- #198 House Robber
- #303 Range Sum Query - Immutable
- #392 Is Subsequence
- #746 Min Cost Climbing Stairs
- #1025 Divisor Game