Skip to content

harsha602/LeetCode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

Algorithm and data structure solutions in Java 8 / JavaScript.

*: LintCode | **: HackerRank | ***: GeeksforGeeks

Topics

OJ (LeetCode & LintCode)

Title Solution Difficulty
001. Two Sum Solution Easy
002. Add Two Numbers Solution Medium
003. Longest Substring Without Repeating Characters Solution Medium
004. Median of Two Sorted Arrays Solution Hard
005. Longest Palindromic Substring Solution Medium
006. ZigZag Conversion Solution Medium
007. Reverse Integer Solution Easy
008. String to Integer (atoi) Solution Medium
009. Palindrome Number Solution Easy
010. Regular Expression Matching Solution Hard
012. Integer to Roman Solution Medium
013. Roman to Integer Solution Easy
014. Longest Common Prefix Solution Easy
015. 3Sum Solution Medium
016. 3Sum Closest Solution Medium
017. Letter Combinations of a Phone Number Solution Medium
019. Remove Nth Node From End of List Solution Medium
021. Merge Two Sorted Lists Solution Easy
022. Generate Parentheses Solution Medium
023. Merge k Sorted Lists Solution Hard
024. Swap Nodes in Pairs Solution Medium
026. Remove Duplicates from Sorted Array Solution Easy
028. Implement_strStr() Solution Easy
029. Divide Two Integers Solution Medium
031. Next Permutation Solution Medium
032. Longest Valid Parentheses Solution Hard
033. Search in Rotated Sorted Array Solution Medium
034. Find First and Last Position of Element in Sorted Array Solution Medium
035. Search Insert Position Solution Easy
036. Valid Sudoku Solution Medium
039. Combination Sum Solution Medium
041. First Missing Positive Solution Hard
042. Trapping Rain Water Solution Hard
043. Multiply Strings Solution Medium
045. Jump Game II Solution Hard
046. Permutations Solution Medium
047. Permutations II Solution Medium
048. Rotate Image Solution Medium
049. Group Anagrams Solution Medium
050. Pow(x, n) Solution Medium
053. Maximum Subarray Solution Easy
054. Spiral Matrix Solution Medium
055. Jump Game Solution Medium
056. Merge Intervals Solution Medium
059. Spiral Matrix II Solution Medium
061. Rotate List Solution Medium
062. Unique Paths Solution Medium
063. Unique Paths II Solution Medium
064. Minimum Path Sum Solution Medium
066. Plus One Solution Easy
067. Add Binary Solution Easy
068. Text Justification Solution Hard
069. Sqrt(x) Solution Easy
070. Climbing Stairs Solution Easy
072. Edit Distance Solution Hard
073. Set Matrix Zeroes Solution Medium
074. Search a 2D Matrix Solution Medium
075. Sort Colors Solution Medium
076. Minimum Window Substring Solution Hard
078. Subsets Solution Medium
083. Remove Duplicates from Sorted List Solution Easy
088. Merge Sorted Array Solution Easy
094. Binary Tree Inorder Traversal Solution Medium
091. Decode Ways Solution Medium
098. Validate Binary Search Tree Solution Medium
101. Symmetric Tree Solution Easy
102. Binary Tree Level Order Traversal Solution Medium
103. Binary Tree Zigzag Level Order Traversal Solution Medium
104. Maximum Depth of Binary Tree Solution Easy
105. Construct Binary Tree from Preorder and Inorder Traversal Solution Medium
108. Convert Sorted Array to Binary Search Tree Solution Easy
112. Path Sum Solution Easy
113. Path Sum II Solution Medium
114. Flatten Binary Tree to Linked List Solution Medium
116. Populating Next Right Pointers in Each Node Solution Medium
119. Pascal's Triangle II Solution Easy
120. Triangle Solution Medium
121. Best Time to Buy and Sell Stock Solution Easy
122. Best Time to Buy and Sell Stock II Solution Easy
124. Binary Tree Maximum Path Sum Solution Hard
126. Word Ladder II Solution Hard
127. Word Ladder Solution Medium
128. Longest Consecutive Sequence Solution Hard
130. Surrounded Regions Solution Medium
131. Palindrome Partitioning Solution Medium
133. Clone Graph Solution Medium
134. Gas Station Solution Medium
136. Single Number Solution Easy
139. Word Break Solution Medium
140. Word Break II Solution Hard
141. Linked List Cycle Solution Easy
144. Binary Tree Preorder Traversal Solution Medium
146. LRU Cache Solution Hard
148. Sort List Solution Medium
150. Evaluate Reverse Polish Notation Solution Medium
151. Reverse Words in a String Solution Medium
152. Maximum Product Subarray Solution Medium
155. Min Stack Solution Easy
159. Longest Substring with At Most Two Distinct Characters Solution Hard
160. Intersection of Two Linked Lists Solution Easy
162. Find Peak Element Solution Medium
163. Missing Ranges Solution Medium
167. Two Sum II - Input array is sorted Solution Easy
166. Fraction to Recurring Decimal Solution Medium
168. Excel Sheet Column Title Solution Easy
173. Binary Search Tree Iterator Solution Medium
179. Largest Number Solution Medium
189. Rotate Array Solution Easy
198. House Robber Solution Easy
199. Binary Tree Right Side View Solution Medium
200. Number of Islands Solution Medium
205. Isomorphic Strings Solution Easy
206. Reverse Linked List Java/JS Easy
207. Course Schedule Java Medium
208. Implement Trie (Prefix Tree) Java Medium
209. Minimum Size Subarray Sum Solution Medium
210. Course Schedule II Solution Medium
211. Add and Search Word - Data structure design Solution Medium
212. Word Search II Solution Hard
213. House Robber II Solution Medium
215. Kth Largest Element in an Array Solution Medium
218. The Skyline Problem Solution Hard
221. Maximal Square Solution Medium
224. Basic Calculator Solution Hard
227. Basic Calculator II Java/JS Medium
228. Summary Ranges Solution Medium
231. Power of Two Solution Easy
234. Palindrome Linked List Solution Easy
235. Lowest Common Ancestor of a Binary Search Tree Solution Easy
236. Lowest Common Ancestor of a Binary Tree Solution Medium
238. Product of Array Except Self Solution Medium
239. Sliding Window Maximum Solution Hard
240. Search a 2D Matrix II Solution Medium
242. Valid Anagram Solution Easy
243. Shortest Word Distance Solution Easy
244. Shortest Word Distance II Solution Medium
249. Group Shifted Strings Solution Medium
251. Flatten 2D Vector Solution Medium
252. Meeting Rooms Solution Easy
253. Meeting Rooms II Solution Medium
257. Binary Tree Paths Solution Easy
258. Add Digits Solution Easy
261. Graph Valid Tree Solution Medium
266. Palindrome Permutation Solution Easy
269. Alien Dictionary Solution Hard
268. Missing Number Solution Easy
277. Find the Celebrity Java/JS Medium
273. Integer to English Words Solution Hard
279. Perfect Squares Solution Medium
280. Wiggle Sort Solution Medium
289. Game of Life Solution Medium
295. Find Median from Data Stream Solution Hard
297. Serialize and Deserialize Binary Tree Solution Hard
300. Longest Increasing Subsequence Solution Medium
305. Number of Islands II Solution Hard
312. Burst Balloons Solution Hard
316. Remove Duplicate Letters Solution Hard
324. Wiggle Sort II Solution Hard
326. Power of Three Solution Easy
329. Longest Increasing Path in a Matrix Solution Hard
336. Palindrome Pairs Solution Hard
340. Longest Substring with At Most K Distinct Characters Solution Hard
341. Flatten Nested List Iterator Solution Medium
342. Power of Four Solution Easy
344. Reverse String Java/JS Easy
345. Reverse Vowels of a String Solution Easy
347. Top K Frequent Elements Solution Medium
359. Logger Rate Limiter Solution Easy
367. Valid Perfect Square Solution Easy
369. Plus One Linked List Solution Medium
373. Find K Pairs with Smallest Sums Solution Medium
378. Kth Smallest Element in a Sorted Matrix Solution Medium
380. Insert Delete GetRandom O(1) Solution Medium
387. First Unique Character in a String Solution Easy
406. Queue Reconstruction by Height Solution Medium
418. Sentence Screen Fitting Solution Medium
421. Maximum XOR of Two Numbers in an Array) Solution Medium
425. Word Squares Solution Hard
441. Arranging Coins Solution Easy
442. Find All Duplicates in an Array Solution Medium
443. String Compression Solution Medium
448. Find All Numbers Disappeared in an Array Solution Easy
463. Island Perimeter Solution Easy
482. License Key Formatting Solution Easy
490. The Maze Solution Medium
507. Perfect Number Solution Easy
557. Reverse Words in a String III Solution Easy
564. Find the Closest Palindrome Solution Hard
582. Kill Process Solution Medium
617. Merge Two Binary Trees Solution Easy
632. Smallest Range Solution Hard
633. Sum of Square Numbers Solution Easy
642. Design Search Autocomplete System Solution Hard
647. Palindromic Substrings Solution Medium
657. Judge Route Circle Solution Easy
657. Robot Return to Origin Solution Easy
674. Longest Continuous Increasing Subsequence Solution Easy
681. Next Closest Time Solution Medium
684. Redundant Connection Solution Medium
688. Knight Probability in Chessboard Solution Medium
692. Top K Frequent Words Solution Medium
695. Max Area of Island Solution Easy
703. Kth Largest Element in a Stream Solution Easy
721. Accounts Merge Solution Medium
737. Sentence Similarity II Solution Medium
739. Daily Temperatures Solution Medium
746. Min Cost Climbing Stairs Solution Easy
751. IP to CIDR Solution Easy
755. Pour Water Solution Medium
756. Pyramid Transition Matrix Solution Medium
759. Employee Free Time Solution Hard
760. Find Anagram Mappings Solution Easy
763. Partition Labels Solution Medium
765. Couples Holding Hands Solution Hard
771. Jewels and Stones Solution Easy
772. Basic Calculator III Solution Hard
773. Sliding Puzzle Solution Hard
781. Rabbits in Forest Solution Medium
787. Cheapest Flights Within K Stops Solution Medium
807. Max Increase to Keep City Skyline Solution Medium
811. Subdomain Visit Count Solution Easy
815. Bus Routes Solution Hard
829. Consecutive Numbers Sum Solution Hard
832. Flipping an Image Solution Easy
843. Guess the Word Solution Hard
904. Fruit Into Baskets Solution Medium
*109. Triangle Solution Easy
*382. Triangle Count Solution Medium
*464. Sort Integers II Solution Easy
*589. Connecting Graph Solution Medium
*590. Connecting Graph II Solution Medium
*591. Connecting Graph III Solution Medium
*609. Two Sum - Less than or equal to target Solution Medium
**Count Duplicates Solution Easy
**Implement Stack By LinkedList Solution Easy
**Delete Node Greater than X Solution Easy
**Merge in Between.java Solution Easy
**Expression_Token Solution Easy
**Build Subsequences Solution Easy
**Merge in Between Solution Medium
**Missing Words Solution Easy
**Shift Letters Solution Easy
**Friends Graph Solution Easy
***Check_Binary_String.java Solution Easy
***Remove_Duplicates_from_Unsorted_Array.java Solution Easy

Array

Title Solution Difficulty
001. Two Sum Solution Easy
015. 3Sum Solution Medium
016. 3Sum Closest Solution Medium
026. Remove Duplicates from Sorted Array Solution Easy
031. Next Permutation Solution Medium
033. Search in Rotated Sorted Array Solution Medium
034. Find First and Last Position of Element in Sorted Array Solution Medium
035. Search Insert Position Solution Easy
039. Combination Sum Solution Medium
041. First Missing Positive Solution Hard
042. Trapping Rain Water Solution Hard
045. Jump Game II Solution Hard
046. Permutations Solution Medium
047. Permutations II Solution Medium
048. Rotate Image Solution Medium
053. Maximum Subarray Solution Easy
054. Spiral Matrix Solution Medium
056. Merge Intervals Solution Medium
059. Spiral Matrix II Solution Medium
062. Unique Paths Solution Medium
063. Unique Paths II Solution Medium
064. Minimum Path Sum Solution Medium
066. Plus One Solution Easy
073. Set Matrix Zeroes Solution Medium
075. Sort Colors Solution Medium
078. Subsets Solution Medium
088. Merge Sorted Array Solution Easy
091. Decode Ways Solution Medium
119. Pascal's Triangle II Solution Easy
120. Triangle Solution Medium
121. Best Time to Buy and Sell Stock Solution Easy
122. Best Time to Buy and Sell Stock II Solution Easy
128. Longest Consecutive Sequence Solution Hard
130. Surrounded Regions Solution Medium
134. Gas Station Solution Medium
136. Single Number Solution Easy
152. Maximum Product Subarray Solution Medium
163. Missing Ranges Solution Medium
167. Two Sum II - Input array is sorted Solution Easy
189. Rotate Array Solution Easy
198. House Robber Solution Easy
209. Minimum Size Subarray Sum Solution Medium
218. The Skyline Problem Solution Hard
277. Find the Celebrity Java/JS Medium
228. Summary Ranges Solution Medium
238. Product of Array Except Self Solution Medium
243. Shortest Word Distance Solution Easy
244. Shortest Word Distance II Solution Medium
253. Meeting Rooms II Solution Medium
280. Wiggle Sort Solution Medium
289. Game of Life Solution Medium
300. Longest Increasing Subsequence Solution Medium
380. Insert Delete GetRandom O(1) Solution Medium
442. Find All Duplicates in an Array Solution Medium
448. Find All Numbers Disappeared in an Array Solution Easy
463. Island Perimeter Solution Easy
674. Longest Continuous Increasing Subsequence Solution Easy
681. Next Closest Time Solution Medium
695. Max Area of Island Solution Easy
755. Pour Water Solution Medium
807. Max Increase to Keep City Skyline Solution Medium
832. Flipping an Image Solution Easy
*464. Sort Integers II Solution Easy
**Count Duplicates Solution Easy

String

Title Solution Difficulty
003. Longest Substring Without Repeating Characters Solution Medium
005. Longest Palindromic Substring Solution Medium
006. ZigZag Conversion Solution Medium
008. String to Integer (atoi) Solution Medium
010. Regular Expression Matching Solution Hard
012. Integer to Roman Solution Medium
013. Roman to Integer Solution Easy
014. Longest Common Prefix Solution Easy
017. Letter Combinations of a Phone Number Solution Medium
022. Generate Parentheses Solution Medium
049. Group Anagrams Solution Medium
028. Implement_strStr() Solution Easy
043. Multiply Strings Solution Medium
067. Add Binary Solution Easy
068. Text Justification Solution Hard
072. Edit Distance Solution Hard
076. Minimum Window Substring Solution Hard
126. Word Ladder II Solution Hard
127. Word Ladder Solution Medium
131. Palindrome Partitioning Solution Medium
150. Evaluate Reverse Polish Notation Solution Medium
151. Reverse Words in a String Solution Medium
162. Find Peak Element Solution Medium
227. Basic Calculator II Solution Medium
249. Group Shifted Strings Solution Medium
266. Palindrome Permutation Solution Easy
273. Integer to English Words Solution Hard
344. Reverse String Solution Easy
345. Reverse Vowels of a String Solution Easy
387. First Unique Character in a String Solution Easy
418. Sentence Screen Fitting Solution Medium
443. String Compression Solution Medium
482. License Key Formatting Solution Easy
772. Basic Calculator III Solution Hard
557. Reverse Words in a String III Solution Easy
564. Find the Closest Palindrome Solution Hard
647. Palindromic Substrings Solution Medium
657. Judge Route Circle Solution Easy
657. Robot Return to Origin Solution Easy
**Expression_Token Solution Easy
**Build Subsequences Solution Easy
**Merge in Between Solution Medium
**Missing Words Solution Easy
**Shift Letters Solution Easy
**Keyboard Solution Medium

Binary Tree

Title Solution Difficulty
094. Binary Tree Inorder Traversal Solution Medium
098. Validate Binary Search Tree Solution Medium
101. Symmetric Tree Solution Easy
102. Binary Tree Level Order Traversal Solution Medium
103. Binary Tree Zigzag Level Order Traversal Solution Medium
104. Maximum Depth of Binary Tree Solution Easy
105. Construct Binary Tree from Preorder and Inorder Traversal Solution Medium
108. Convert Sorted Array to Binary Search Tree Solution Easy
112. Path Sum Solution Easy
113. Path Sum II Solution Medium
114. Flatten Binary Tree to Linked List Solution Medium
116. Populating Next Right Pointers in Each Node Solution Medium
124. Binary Tree Maximum Path Sum Solution Hard
144. Binary Tree Preorder Traversal Solution Medium
173. Binary Search Tree Iterator Solution Medium
199. Binary Tree Right Side View Solution Medium
297. Serialize and Deserialize Binary Tree Solution Hard
235. Lowest Common Ancestor of a Binary Search Tree Solution Easy
236. Lowest Common Ancestor of a Binary Tree Solution Medium
257. Binary Tree Paths Solution Easy
617. Merge Two Binary Trees Solution Easy

Binary Search

Title Solution Difficulty
004. Median of Two Sorted Arrays Solution Hard
029. Divide Two Integers Solution Medium
033. Search in Rotated Sorted Array Solution Medium
034. Find First and Last Position of Element in Sorted Array Solution Medium
035. Search Insert Position Solution Easy
050. Pow(x, n) Solution Medium
069. Sqrt(x) Solution Easy
074. Search a 2D Matrix Solution Medium
162. Find Peak Element Solution Medium
240. Search a 2D Matrix II Solution Medium
300. Longest Increasing Subsequence Solution Medium
367. Valid Perfect Square Solution Easy

Linked List

Title Solution Difficulty
002. Add Two Numbers Solution Medium
019. Remove Nth Node From End of List Solution Medium
021. Merge Two Sorted Lists Solution Easy
024. Swap Nodes in Pairs Solution Medium
023. Merge k Sorted Lists Solution Hard
061. Rotate List Solution Medium
083. Remove Duplicates from Sorted List Solution Easy
141. Linked List Cycle Solution Easy
146. LRU Cache Solution Hard
148. Sort List Solution Medium
160. Intersection of Two Linked Lists Solution Easy
206. Reverse Linked List Solution Easy
234. Palindrome Linked List Solution Easy
369. Plus One Linked List Solution Medium
**Delete Node Greater than X Solution Easy
**Merge in Between.java Solution Easy

HashMap

Title Solution Difficulty
003. Longest Substring Without Repeating Characters Solution Medium
036. Valid Sudoku Solution Medium
049. Group Anagrams Solution Medium
076. Minimum Window Substring Solution Hard
146. LRU Cache Solution Hard
159. Longest Substring with At Most Two Distinct Characters Solution Hard
166. Fraction to Recurring Decimal Solution Medium
205. Isomorphic Strings Solution Easy
242. Valid Anagram Solution Easy
244. Shortest Word Distance II Solution Medium
249. Group Shifted Strings Solution Medium
336. Palindrome Pairs Solution Hard
340. Longest Substring with At Most K Distinct Characters Solution Hard
347. Top K Frequent Elements Solution Medium
359. Logger Rate Limiter Solution Easy
380. Insert Delete GetRandom O(1) Solution Medium
387. First Unique Character in a String Solution Easy
681. Next Closest Time Solution Medium
692. Top K Frequent Words Solution Medium
760. Find Anagram Mappings Solution Easy
763. Partition Labels Solution Medium
771. Jewels and Stones Solution Easy
781. Rabbits in Forest Solution Medium
811. Subdomain Visit Count Solution Easy
**Keyboard Solution Medium

Queue

Title Solution Difficulty
102. Binary Tree Level Order Traversal Solution Medium
207. Course Schedule Java Medium
239. Sliding Window Maximum Solution Hard
582. Kill Process Solution Medium

Heap

Title Solution Difficulty
215. Kth Largest Element in an Array Solution Medium
347. Top K Frequent Elements Solution Medium
373. Find K Pairs with Smallest Sums Solution Medium
378. Kth Smallest Element in a Sorted Matrix Solution Medium
632. Smallest Range Solution Hard
642. Design Search Autocomplete System Solution Hard
692. Top K Frequent Words Solution Medium
703. Kth Largest Element in a Stream Solution Easy
759. Employee Free Time Solution Hard

Two Pointers

Title Solution Difficulty
003. Longest Substring Without Repeating Characters Solution Medium
016. 3Sum Closest Solution Medium
026. Remove Duplicates from Sorted Array Solution Easy
031. Next Permutation Solution Medium
042. Trapping Rain Water Solution Hard
075. Sort Colors Solution Medium
088. Merge Sorted Array Solution Easy
159. Longest Substring with At Most Two Distinct Characters Solution Hard
167. Two Sum II - Input array is sorted Solution Easy
345. Reverse Vowels of a String Solution Easy
340. Longest Substring with At Most K Distinct Characters Solution Hard
632. Smallest Range Solution Hard
633. Sum of Square Numbers Solution Easy
763. Partition Labels Solution Medium
904. Fruit Into Baskets Solution Medium
*382. Triangle Count Solution Medium
*464. Sort Integers II Solution Easy
*609. Two Sum - Less than or equal to target Solution Medium

Math

Title Solution Difficulty
007. Reverse Integer Solution Easy
008. String to Integer (atoi) Solution Medium
009. Palindrome Number Solution Easy
012. Integer to Roman Solution Medium
013. Roman to Integer Solution Easy
029. Divide Two Integers Solution Medium
050. Pow(x, n) Solution Medium
136. Single Number Solution Easy
166. Fraction to Recurring Decimal Solution Medium
168. Excel Sheet Column Title Solution Easy
224. Basic Calculator I Java Hard
231. Power of Two Solution Easy
258. Add Digits Solution Easy
268. Missing Number Solution Easy
273. Integer to English Words Solution Hard
279. Perfect Squares Solution Medium
326. Power of Three Solution Easy
342. Power of Four Solution Easy
441. Arranging Coins Solution Easy
507. Perfect Number Solution Easy
633. Sum of Square Numbers Solution Easy
781. Rabbits in Forest Solution Medium
829. Consecutive Numbers Sum Solution Hard

Bit Manipulation

Title Solution Difficulty
231. Power of Two Solution Easy
751. IP to CIDR Solution Easy

Breadth-First Search

Title Solution Difficulty
116. Populating Next Right Pointers in Each Node Solution Medium
126. Word Ladder II Solution Hard
127. Word Ladder Solution Medium
128. Longest Consecutive Sequence Solution Hard
130. Surrounded Regions Solution Medium
200. Number of Islands Solution Medium
210. Course Schedule II Solution Medium
269. Alien Dictionary Solution Hard
329. Longest Increasing Path in a Matrix Solution Hard
490. The Maze Solution Medium
695. Max Area of Island Solution Easy
773. Sliding Puzzle Solution Hard
787. Cheapest Flights Within K Stops [Solution]
(./LeetCode/787_Cheapest_Flights_Within_K_Stops.java) Medium
815. Bus Routes Solution Hard

Depth-First Search

Title Solution Difficulty
101. Symmetric Tree Solution Easy
105. Construct Binary Tree from Preorder and Inorder Traversal Solution Medium
108. Convert Sorted Array to Binary Search Tree Solution Easy
126. Word Ladder II Solution Hard
131. Palindrome Partitioning Solution Medium
756. Pyramid Transition Matrix Solution Medium
490. The Maze Solution Medium

Backtracking

Title Solution Difficulty
017. Letter Combinations of a Phone Number Solution Medium
022. Generate Parentheses Solution Medium
039. Combination Sum Solution Medium
046. Permutations Solution Medium
047. Permutations II Solution Medium
131. Palindrome Partitioning Solution Medium
140. Word Break II Solution Hard
212. Word Search II Solution Hard

Stack

Title Solution Difficulty
032. Longest Valid Parentheses Solution Hard
094. Binary Tree Inorder Traversal Solution Medium
103. Binary Tree Zigzag Level Order Traversal Solution Medium
144. Binary Tree Preorder Traversal Solution Medium
150. Evaluate Reverse Polish Notation Solution Medium
155. Min Stack Solution Easy
173. Binary Search Tree Iterator Solution Medium
316. Remove Duplicate Letters Solution Hard
341. Flatten Nested List Iterator Solution Medium
739. Daily Temperatures Solution Medium
**Implement Stack By LinkedList Solution Easy

Dynamic Programming

Title Solution Difficulty
005. Longest Palindromic Substring Solution Medium
010. Regular Expression Matching Solution Hard
055. Jump Game Solution Medium
062. Unique Paths Solution Medium
064. Minimum Path Sum Solution Medium
070. Climbing Stairs Solution Easy
072. Edit Distance Solution Hard
091. Decode Ways Solution Medium
120. Triangle Solution Medium
131. Palindrome Partitioning Solution Medium
139. Word Break Solution Medium
140. Word Break II Solution Hard
152. Maximum Product Subarray Solution Medium
198. House Robber Solution Easy
213. House Robber II Solution Medium
221. Maximal Square Solution Medium
224. Basic Calculator I Java Hard
279. Perfect Squares Solution Medium
312. Burst Balloons Solution Hard
329. Longest Increasing Path in a Matrix Solution Hard
647. Palindromic Substrings Solution Medium
688. Knight Probability in Chessboard Solution Medium
746. Min Cost Climbing Stairs Solution Easy
*109. Triangle Solution Easy

Sort

Title Solution Difficulty
023. Merge k Sorted Lists Solution Hard
049. Group Anagrams Solution Medium
056. Merge Intervals Solution Medium
148. Sort List Solution Medium
179. Largest Number Solution Medium
218. The Skyline Problem Solution Hard
252. Meeting Rooms Solution Easy
253. Meeting Rooms II Solution Medium
280. Wiggle Sort Solution Medium
295. Find Median from Data Stream Solution Hard
324. Wiggle Sort II Solution Hard
*464. Sort Integers II Solution Easy

Greedy

Title Solution Difficulty
045. Jump Game II Solution Hard
134. Gas Station Solution Medium
406. Queue Reconstruction by Height Solution Medium
765. Couples Holding Hands Solution Hard
787. Cheapest Flights Within K Stops Solution Medium

Graph

Title Solution Difficulty
133. Clone Graph Solution Medium
207. Course Schedule Java Medium
210. Course Schedule II Solution Medium
269. Alien Dictionary Solution Hard
582. Kill Process Solution Medium

Trie

Title Solution Difficulty
208. Implement Trie (Prefix Tree) Solution Medium
421. Maximum XOR of Two Numbers in an Array) Solution Medium
642. Design Search Autocomplete System Solution Hard

Union Find

Title Solution Difficulty
211. Add and Search Word - Data structure design Solution Medium
212. Word Search II Solution Hard
261. Graph Valid Tree Solution Medium
305. Number of Islands II Solution Hard
425. Word Squares Solution Hard
684. Redundant Connection Solution Medium
721. Accounts Merge Solution Medium
737. Sentence Similarity II Solution Medium
765. Couples Holding Hands Solution Hard
*589. Connecting Graph Solution Medium
*590. Connecting Graph II Solution Medium
*591. Connecting Graph III Solution Medium

Design

Title Solution Difficulty
380. Insert Delete GetRandom O(1) Solution Medium
642. Design Search Autocomplete System Solution Hard
**Friends Graph Solution Easy

License

MIT

About

Give me the offer!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.3%
  • JavaScript 0.7%