Skip to content

This repository contains my solutions to problems in different online judge platforms such as LeetCode, Work@Tech, etc. 425+ solved LeetCode problems.

License

Notifications You must be signed in to change notification settings

ani03sha/OnlineJudges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Online Judges

License Language

This repository contains my solutions to problems in different online judge platforms such as LeetCode, Work@Tech, etc. If you like this repository, consider giving it a star ⭐.

Connect with me via

Twitter LinkedIn

LeetCode

# Title Solutions Difficulty Tag
2869 Minimum Operations To Collect Elements Solution Easy Array
2439 Minimize Maximum Of Array Solution Medium Array, Greedy, Prefix Sum
2405 Optimal Partitioning Of String Solution Medium String, Hash Table
2390 Removing Stars From A String Solution Medium Stack, Simulation
2349 Design A Number Container System Solution Medium Design, Hash Set
2336 Smallest Number In Infinite Set Solution Medium Design, Heap, Hash Set
2305 Fair Distribution Of Cookies Solution Medium Backtracking
2300 Successful Pairs Of Spells And Potions Solution Medium Array, Binary Search
2265 Count Nodes Equal To Average Of Subtree Solution Medium Tree
2236 Root Equals Sum Of Children Solution Easy Tree
2235 Add Two Integers Solution Easy Math
2218 Maximum Value Of K Coins From Piles Solution Hard Dynamic Programming
2215 Find The Difference Of Two Arrays Solution Easy Array, Hash Table
2167 Count Operations To Obtain Zero Solution Easy Math
2164 Sort Even And Odd Indices Independently Solution Easy Heap, Sorting
2140 Solving Questions With Brainpower Solution Medium Dynamic Programming
2022 Convert 1D Array Into 2D Array Solution Easy Array, Matrix
2011 Final Value Of Variable After Performing Operations Solution Easy String
1964 Find The Longest Valid Obstacle Course At Each Position Solution Hard Array, Greedy, Binary Search
1929 Concatenation Of Array Solution Easy Array
1928 Minimum Cost To Reach Destination In Time Solution Hard Graph, Dijkstra
1921 Eliminate Maximum Number Of Monsters Solution Medium Array, Greedy
1920 Build Array From Permutation Solution Easy Array
1913 Maximum Product Difference Between Two Pairs Solution Easy Array, Sort
1857 Largest Color Value In A Directed Graph Solution Hard Graph, Topological Sort
1845 Seat Reservation Manager Solution Medium Heap
1822 Sign Of The Product Of An Array Solution Easy Math
1768 Merge Strings Alternately Solution Easy String, Two Pointers
1757 Recyclable And Low Fat Products Solution Easy Database
1721 Swapping Noes In A Linked List Solution Medium Linked List
1697 Checking Existence Of Edge Length Limited Paths Solution Hard Union Find, Graph
1695 Maximum Erasure Value Solution Medium Array, Two Pointers
1689 Partitioning Into Minimum Number Of Deci-Binary Numbers Solution Medium String, Greedy
1679 Max Number Of K-Sum Pairs Solution Medium Array
1675 Minimize Deviation In Array Solution Hard Heap
1672 Richest Customer Wealth Solution Easy Array, Matrix
1663 Smallest String With A Given Numeric Value Solution Medium String, Greedy
1658 Minimum Operations To Reduce X To Zero Solution Medium Array, Sliding Window
1647 Minimum Deletions To Make Character Frequencies Unique Solution Medium Heap
1642 Furthest Building You Can Reach Solution Medium Heap
1641 Count Sorted Vowel Strings Solution Medium Math
1639 Number Of Ways To Form A Target String Given A Dictionary Solution Medium Dynamic Programming
1631 Path With Minimum Effort Solution Medium Array, DFS
1584 Min Cost To Connect All Points Solution Medium Graph, Minimum Spanning Tree
1579 Remove Max Number Of Edges To Keep Graph Fully Traversable Solution Hard Union Find, Graph
1572 Matrix Diagonal Sum Solution Easy Array, Matrix
1567 Maximum Length Of Subarray With Positive Product Solution Medium Dynamic Programming, Array
1535 Find The Winner Of An Array Game Solution Medium Array, Simulation
1510 Stone Game IV Solution Hard Dynamic Programming, Array
1503 Last Moment Before All Ants Fall Out Of A Plank Solution Medium Array, Simulation
1498 Number Of Subsequences That Satisfy The Given Sum Condition Solution Medium Array, Two Pointers, Binary Search
1491 Average Salary Excluding The Minimum And Maximum Salary Solution Easy Array
1480 Running Sum Of 1D Array Solution Easy Array, Prefix Sum
1463 Cherry Pickup II Solution Hard Dynamic Programming
1461 Check If A String Contains All Binary Codes Of Size K Solution Medium String
1456 Maximum Number Of Vowels In A Substring Of Given Length Solution Medium String, Sliding Window
1431 Build An Array With Stack Operations Solution Medium Array, Simulation
1431 Kids With The Greatest Number Of Candies Solution Easy Array
1423 Maximum Points You Can Obtain From Cards Solution Medium Array, Prefix Sum
1416 Restore The Array Solution Hard Dynamic Programming
1413 Minimum Value To Get Positive Step By Step Sum Solution Easy Array, Prefix Sum
1396 Design Underground System Solution Medium Design
1379 Find A Corresponding Node Of A Binary Tree In A Clone Of That Tree Solution Medium Tree, BFS
1372 Longest Zigzag Path In A Binary Tree Solution Medium Tree, BFS
1359 Count All Valid Pickup And Delivery Options Solution Hard Dynamic Programming, Math
1354 Construct Target Array With Multiple Sums Solution Hard Heap
1345 Jump Game IV Solution Hard Graph, BFS
1342 Number Of Steps To Reduce A Number To Zero Solution Easy Math
1338 Reduce Array Size To The Half Solution Medium Array, Sorting, Heap
1337 The K Weakest Rows In A Matrix Solution Easy Array, Sorting
1332 Remove Palindromic Subsequences Solution Easy String, Two Pointer
1312 Minimum Insertion Steps To Make A String Palindrome Solution Hard Dynamic Programming, String
1305 All Elements In Two Binary Search Trees Solution Medium Tree, DFS, Sorting
1302 Deepest Leaves Sum Solution Medium Tree, DFS
1291 Sequential Digits Solution Medium Enumeration
1288 Remove Covered Intervals Solution Medium Array, Sorting
1286 Iterator For Combination Solution Medium Design, Bit Manipulation
1283 Find The Smallest Divisor Given A Threshold Solution Medium Array, Binary Search
1268 Search Suggestions System Solution Medium Trie
1260 Shift 2D Grid Solution Easy Array, Matrix
1254 Number Of Closed Islands Solution Medium Array, Matrix
1249 Minimum Remove To Make Valid Parentheses Solution Medium Stack
1218 Longest Arithmetic Subsequence Of Given Difference Solution Medium Dynamic Programming
1209 Remove All Adjacent Duplicates in String II Solution Medium String
1202 Smallest String With Swaps Solution Medium Union Find, Graph
1192 Critical Connections In A Network Solution Hard Graph, DFS
1189 Maximum Number Of Balloons Solution Easy String, Counting
1155 Number Of Dice Rolls With Target Sum Solution Medium Dynamic Programming
1143 Longest Common Subsequence Solution Medium Dynamic Programming
1137 N-th Tribonacci Number Solution Easy Dynamic Programming
1108 Defanging an IP Address Solution Easy String
1091 Shortest Path In Binary Matrix Solution Medium Array, Matrix, BFS
1094 Car Pooling Solution Medium Array, Prefix Sum
1049 Last Stone Weight II Solution Medium Dynamic Programming
1048 Longest String Chain Solution Medium Dynamic Programming
1047 Remove All Adjacent Duplicates In String Solution Easy String
1046 Last Stone Weight Solution Easy Heap
1041 Robot Bounded In Circle Solution Medium String
1035 Uncrossed Line Solution Medium Dynamic Programming
1029 Two City Scheduling Solution Medium Array, Greedy
1022 Sum Of Root To Leaf Binary Numbers Solution Easy Tree, DFS
1020 Number Of Enclaves Solution Medium Array, Matrix, DFS, BFS
1014 Best Sight Seeing Pair Solution Medium Dynamic Programming
1010 Pairs Of Songs With Total Durations Divisible By 60 Solution Medium Dynamic Programming
1009 Complement Of Base 10 Integer Solution Easy Bit Manipulation
1007 Minimum Domino Rotations For Equal Row Solution Medium Array, Greedy
1004 Max Consecutive Ones III Solution Medium Array, Sliding Window
997 Find The Town Judge Solution Easy Graph
994 Rotting Oranges Solution Medium Array, BFS
993 Cousins In Binary Tree Solution Easy Tree, BFS
991 Broken Calculator Solution Medium Math, Greedy
987 Vertical Order Traversal Of A Binary Tree Solution Hard Tree, DFS
983 Minimum Cost For Tickets Solution Medium Dynamic Programming
981 Time Based Key Value Store Solution Medium Design, Hash Table, Binary Search
980 Unique Paths III Solution Hard Array, Backtracking, Matrix
977 Squares Of A Sorted Array Solution Easy Array, Two Pointers, Sorting
973 K Closest Points To Origin Solution Medium Array, Math, Heap
968 Binary Tree Cameras Solution Hard Tree, DFS
953 Verifying An Alien Dictionary Solution Easy String
946 Validate Stack Sequences Solution Easy Stack
941 Valid Mountain Array Solution Easy Array
931 Minimum Falling Path Sum Solution Medium Dynamic Programming
923 3 Sum With Multiplicity Solution Medium Array, Two Pointers
918 Maximum Sum Circular Subarray Solution Medium Dynamic Programming
917 Reverse Only Letters Solution Easy String, Two Pointers
912 Sort An Array Solution Medium Array, Sorting
905 Sort Array By Parity Solution Easy Array
897 Increasing Order Search Tree Solution Easy Binary Tree, DFS
895 Maximum Frequency Stack Solution Hard Stack
887 Super Egg Drop Solution Hard Dynamic Programming
881 Boats To Save People Solution Medium Array
879 Profitable Schemes Solution Hard Dynamic Programming
877 Stone Game Solution Medium Array
876 Middle Of The Linked List Solution Easy Linked List
875 Koko Eating Bananas Solution Medium Array, Binary Search
871 Minimum Number Of Refueling Stops Solution Hard Dynamic Programming
867 Transpose Matrix Solution Easy Array, Matrix
863 All Nodes Distance K In Binary Tree Solution Easy Tree, Graph, BFS, DFS
856 Score OF Parentheses Solution Medium Stack
852 Peak Index In A Mountain Array Solution Medium Array, Binary Search
849 Maximize Distance To Closest Person Solution Medium Array, Two Pointers
847 Shortest Path Visiting All Nodes Solution Hard Graph, Bit Manipulation
844 Backspace String Compare Solution Easy String, Two Pointers
839 Similar String Groups Solution Hard Graph, DFS, BFS
827 Making A Large Island Solution Hard Array, DFS
820 Shortest Encoding Of Words Solution Hard Array, DFS
799 Champagne Tower Solution Medium Dynamic Programming
785 Is Graph Bipartite? Solution Medium Graph, Bipartite, DFS
784 Letter Case Permutation Solution Medium Backtracking, String
767 Reorganize String Solution Medium Heap
763 Partition Labels Solution Medium String, Two Pointers
746 Min Cost Climbing Stairs Solution Easy Dynamic Programming
745 Prefix And Suffix Search Solution Hard Trie
744 Find Smallest Letter Greater Than Target Solution Easy Array, Binary Search
743 Network Delay Time Solution Medium Graph, DFS, BFS, Shortest Path
740 Delete And Earn Solution Medium Dynamic Programming, Array
739 Daily Temperatures Solution Medium Stack
735 Asteroid Collision Solution Medium Stack
733 Flood Fill Solution Easy Array, DFS
721 Accounts Merge Solution Medium Graph, DFS
714 Best Time to Buy and Sell Stock with Transaction Fee Solution Medium Dynamic Programming
706 Design HashMap Solution Easy Design
705 Design HashSet Solution Easy Design
704 Binary Search Solution Easy Array, Binary Search
703 Kth Largest Element In A Stream Solution Easy Heap, Data Stream
701 Insert Into A Binary Search Tree Solution Medium Tree
700 Search In A Binary Search Tree Solution Easy Tree
698 Partition To K Equal Sum Subsets Solution Medium Backtracking
695 Max Area Of Islands Solution Medium Array, Depth First Search
682 Baseball Game Solution Easy Stack
680 Valid Palindrome II Solution Easy String, Two Pointers
673 Number of Longest Increasing Subsequence Solution Medium Dynamic Programming
669 Trim A Binary Search Tree Solution Medium Tree, Recursion
668 Kth Smallest Number In Multiplication Table Solution Hard Array, Matrix, Binary Search
665 Non-Decreasing Array Solution Medium Array
662 Maximum Width Of Binary Tree Solution Medium Tree, DFS
658 Find K Closest Elements Solution Medium Array, Binary Search
650 2 Keys Keyboard Solution Medium Dynamic Programming
649 Dota2 Senate Solution Medium String, Greedy
647 Palindromic Substrings Solution Medium Dynamic Programming
646 Maximum Length Of Pair Chain Solution Medium Dynamic Programming
637 Average Of Levels In Binary Tree Solution Easy Tree, BFS
630 Course Schedule III Solution Hard Greedy, Heap
617 Merge Two Binary Trees Solution Easy Tree, DFS, BFS
605 Can Place Flowers Solution Easy Array, Greedy
583 Delete Operation For Two Strings Solution Medium Dynamic Programming
581 Shortest Unsorted Continuous Subarray Solution Medium Array, Two Pointers
572 Subtree Of Another Tree Solution Easy Tree
567 Permutation In String Solution Medium String, Two Pointers, Sliding Window
566 Reshape The Matrix Solution Easy Array, Matrix
560 Subarray Sum Equals K Solution Medium Array, Prefix Sum
557 Reverse Words In A String III Solution Easy String
556 Next Greater Element III Solution Medium Math
543 Diameter Of Binary Tree Solution Easy Tree
542 Zero One Matrix Solution Medium Array, Matrix, BFS
540 Single Element In A Sorted Array Solution Medium Array, Binary Search
538 Convert BST To Greater Tree Solution Medium Tree, Recursion
535 Encode And Decode TinyURL Solution Medium Design
532 K Diff Pairs In An Array Solution Medium Array
525 Contiguous Array Solution Medium Array, Prefix Sum
520 Detect Capital Solution Easy String
518 Coin Change II Solution Medium Dynamic Programming
516 Longest Palindromic Subsequence Solution Medium Dynamic Programming
509 Fibonacci Number Solution Easy Dynamic Programming
503 Next Greater Element II Solution Medium Stack
501 Find Mode In Binary Search Tree Solution Easy Tree, BST
496 Next Greater Element I Solution Easy Stack
494 Target Sum Solution Medium Dynamic Programming
485 Max Consecutive Ones Solution Easy Array
474 Ones And Zeroes Solution Medium Dynamic Programming
462 Minimum Moves To Equal Array Elements II Solution Medium Math
461 HammingDistance Solution Easy Bit Manipulation
460 LFU Cache Solution Hard Design
456 132 Pattern Solution Medium Stack
454 4 Sum II Solution Medium Array
452 Minimum Number Of Arrows To Burst Balloons Solution Medium Array, Sorting
450 Delete Node In A BST Solution Medium Tree, BST
448 Find All Numbers Disappeared In An Array Solution Easy Array
443 String Compression Solution Medium String
442 Find All Duplicates In An Array Solution Medium Array
441 Arranging Coins Solution Easy Math
438 Find All Anagrams In A String Solution Easy String, Sliding Window
421 Maximum XOR Of TwoNumbers In An Array Solution Medium Bit Manipulation
417 Pacific Atlantic Water Flow Solution Medium Array, BFS
416 Partition Equal Subset Sum Solution Medium Dynamic Programming
413 Arithmetic Slices Solution Medium Dynamic Programming
412 Fizz Buzz Solution Easy Math
410 Split Array LargestSum Solution Hard Dynamic Programming
409 Longest Palindrome Solution Easy String, Greedy
406 Queue Reconstruction By Height Solution Easy Tree, DFS
404 Sum Of Left Leaves Solution Medium Array, Greedy, Sorting
402 Remove K Digits Solution Easy Tree, DFS
399 Evaluate Division Solution Medium Graph, DFS
398 Random Pick Index Solution Medium Math, Reservoir Sampling, Randomized
394 Decode String Solution Medium Stacks, Depth First Search
392 Is Subsequence Solution Easy String, Two Pointers
389 Find The Difference Solution Easy String
387 First Unique Character In A String Solution Easy String
383 Ransom Note Solution Easy String
382 Linked List Random Node Solution Medium Randomized, Reservoir Sampling, Linked List
381 Insert Delete GetRandom O(1) Duplicates Allowed Solution Hard Design, Randomized
380 Insert Delete GetRandom O(1) Solution Medium Design, Randomized
378 Kth Smallest Element in a Sorted Matrix Solution Medium Array, Matrix
377 Combination Sum IV Solution Medium Array, Dynamic Programming
374 Guess Number Higher Or Lower Solution Easy Binary Search, Interactive
368 Largest Divisible Subset Solution Medium Array
354 Russian Doll Envelopes Solution Hard Dynamic Programming
350 Intersection Of Two Arrays II Solution Easy Array
349 Intersection Of Two Arrays Solution Easy Array
347 Top K Frequent Elements Solution Medium Heap
344 Reverse String Solution Easy String
341 Flatten Nested List Iterator Solution Medium Design, Iterator
338 Counting Bits Solution Easy Dynamic Programming, Bit Manipulation
337 House Robber III Solution Medium Dynamic Programming, Tree
329 Longest Increasing Path In A Matrix Solution Hard Dynamic Programming, DFS
328 Odd Even Linked List Solution Medium Linked List
327 Count Of Range Sum Solution Hard Array, Merge Sort
323 Number Of Connected Components In An Undirected Graph Solution Medium Graph, BFS
322 Coin Change Solution Medium Dynamic Programming
320 Generalized Abbreviation Solution Medium Backtracking
319 Bulb Switcher Solution Medium Math
318 Maximum Product Of Word Lengths Solution Medium String
316 Remove Duplicate Characters Solution Medium String, Greedy
312 Burst Balloons Solution Hard Dynamic Programming
310 Minimum Height Trees Solution Medium Graph, Tree, BFS
309 Best Time to Buy and Sell Stock with Cooldown Solution Medium Dynamic Programming
304 Range Sum Query 2D - Immutable Solution Medium Dynamic Programming
303 Range Sum Query - Immutable Solution Easy Dynamic Programming
300 Longest Increasing Subsequence Solution Medium Dynamic Programming
297 Serialize And Deserialize Binary Tree Solution Hard Design, Binary Tree
295 Find Median From Data Stream Solution Hard Heap
290 Word Pattern Solution Easy String
289 Game Of Life Solution Medium Array, Matrix
287 Find The Duplicate Number Solution Medium Array, Two Pointers
284 Peeking Iterator Solution Medium Design, Iterator
283 Move Zeroes Solution Easy Array
279 Perfect Squares Solution Medium Dynamic Programming
278 First Bad Version Solution Easy Array, Binary Search
268 Missing Number Solution Easy Array, Math
264 Ugly Number II Solution Medium Dynamic Programming
261 Graph Valid Tree Solution Medium Graph, Tree, BFS
258 Add Digits Solution Easy Math
257 Binary Tree Paths Solution Easy Backtracking
252 Meeting Rooms Solution Easy Array, Sorting
242 Valid Anagram Solution Easy String
240 Search A 2D Matrix II Solution Medium Array, Matrix
238 Product Of Array Except Self Solution Medium Array, Prefix Sum
236 Lowest Common Ancestor Of A Binary Tree Solution Medium Binary Tree, DFS
235 Lowest Common Ancestor Of A Binary Search Tree Solution Medium Binary Tree, Binary Search Tree, BFS, DFS
234 Palindrome Linked List Solution Easy Linked List, Two Pointers
232 Implement Queue Using Stacks Solution Easy Design, Stack, Queue
231 Power Of Two Solution Easy Bit Manipulation, Math
230 Kth Smallest Element In A BST Solution Medium Tree, DFS
228 Summary Ranges Solution Easy Array
226 Invert Binary Tree Solution Easy Tree
225 Implement Stack Using Queues Solution Easy Stack, Queue
222 Count Complete Tree Node Solution Medium Tree, DFS
221 Maximal Square Solution Medium Dynamic Programming
217 Contains Duplicate Solution Easy Array
216 Combination Sum III Solution Medium Backtracking
215 Kth Largest Element In An Array Solution Medium Array, Quick Select
213 House Robber II Solution Medium Dynamic Programming
212 Word Search II Solution Hard Array, Matrix, Backtracking, DFS, Trie
211 Design Add And Search Words Data Structure Solution Medium Design, Trie, DFS
210 Course Schedule II Solution Medium Graph, DFS
208 Implement Trie (Prefix Tree) Solution Medium Design, Trie
207 Course Schedule Solution Medium Graph, DFS
206 Reverse Linked List Solution Easy Linked List
203 Remove Linked List Elements Solution Easy Linked List
202 Happy Number Solution Easy Math
201 Bitwise AND Of Numbers Range Solution Medium Bit Manipulation
200 Number Of Islands Solution Medium Array, Matrix, DFS
199 Binary Tree Right Side View Solution Medium Tree, BFS
198 House Robber Solution Easy Dynamic Programming
191 Number Of 1 Bits Solution Easy Bit Manipulation
190 Reverse Bits Solution Easy Bit Manipulation
189 Rotate Array Solution Easy Array, Two Pointers
188 Best Time To Buy And Sell Stock IV Solution Hard Dynamic Programming
174 Dungeon Game Solution Hard Dynamic Programming
173 Binary Search Tree Iterator Solution Medium Tree
171 Excel Sheet Column Number Solution Easy Math, String
169 Majority Element Solution Easy Array
167 Two Sum II - Input Array Is Sorted Solution Easy Array
165 Compare Version Numbers Solution Medium String, Two Pointers
162 Find Peak Element Solution Medium Array, Binary Search
160 Intersection Of Two Linked Lists Solution Easy Linked List, Two Pointers
155 Min Stack Solution Medium Stack
153 Find Minimum In rotated Sorted Array Solution Medium Array, Binary Search
152 Maximum Product Subarray Solution Medium Dynamic Programming, Array
151 Reverse Words In A String Solution Medium String
150 Evaluate Reverse Polish Notation Solution Medium Stack, String
148 Sort List Solution Medium Linked List, Sorting
146 LRU Cache Solution Medium Design
145 Binary Tree Postorder Traversal Solution Easy Tree
144 Binary Tree Preorder Traversal Solution Easy Tree
142 Linked List Cycle II Solution Medium Linked List, Two Pointers
141 Linked List Cycle Solution Easy Linked List, Two Pointers
139 Word Break Solution Medium Dynamic Programming
138 Copy List With Random Pointer Solution Medium Linked List
136 Single Number Solution Easy Bit Manipulation, Array
135 Candy Solution Hard Array, Greedy
134 Gas Station Solution Medium Array, Greedy
133 Clone Graph Solution Medium Graph
131 Palindrome Partitioning Solution Medium Backtracking, String
130 Surrounded Regions Solution Medium Array, Matrix, DFS
129 Sum Root To Leaf Numbers Solution Medium Tree, DFS
128 Longest Consecutive Sequence Solution Medium Array
127 Word Ladder Solution Hard String, BFS
125 Valid Palindrome Solution Easy String, Two Pointers
123 Best Time To Buy And Sell Stock III Solution Hard Dynamic Programming
122 Best Time To Buy And Sell Stock II Solution Easy Dynamic Programming
121 Best Time To Buy And Sell Stock Solution Easy Dynamic Programming
120 Triangle Solution Medium Dynamic Programming
118 Pascal's Triangle Solution Easy Dynamic Programming
117 Populating Next Right Pointers In Each Node II Solution Medium Tree, DFS
116 Populating Next Right Pointers In Each Node Solution Medium Tree, BFS
112 Path Sum Solution Easy Tree, DFS
111 Minimum Depth Of Binary Tree Solution Easy Tree, BFS
110 Balanced Binary Tree Solution Easy Tree, DFS
108 Convert Sorted Array To Binary Search Tree Solution Easy Tree
107 Binary Tree Level Order Traversal II Solution Medium Tree, BFS
104 Maximum Depth Of Binary Tree Solution Easy Tree
103 Binary Tree Zigzag Level Order Traversal Solution Medium Tree, BFS
102 Binary Tree Level Order Traversal Solution Medium Tree, BFS
101 Symmetric Tree Solution Easy Tree
100 Same Tree Solution Easy Tree, DFS, BFS
99 Recover Binary Search Tree Solution Medium Tree, Morris Traversal
98 Validate Binary Search Tree Solution Medium Tree
96 Unique Binary Search Trees Solution Medium Dynamic Programming, Tree
95 Unique Binary Search Trees II Solution Medium Tree
94 Binary Tree Inorder Traversal Solution Easy Tree, Stack, DFS
91 Decode Ways Solution Medium Dynamic Programming, String
90 Subsets II Solution Medium Backtracking, String
88 Merge Sorted Array Solution Easy Array, Two Pointer, Sorting
84 Largest Rectangle In Histogram Solution Hard Stack, Array
83 Remove Duplicates From Sorted List Solution Easy Linked List
82 Remove Duplicates From Sorted List II Solution Medium Linked List
81 Search In Rotated Sorted Array II Solution Medium Array, Binary Search
80 Remove Duplicates In Sorted Array II Solution Medium Array
79 Word Search Solution Medium Array, Matrix, Backtracking, DFS
78 Subsets Solution Medium Bit Manipulation
77 Combinations Solution Medium Backtracking
75 Sort Colors Solution Medium Array, Two Pointers
74 Search A 2D Matrix Solution Medium Array, Matrix
73 Set Matrix Zeroes Solution Medium Array, Matrix, Simulation
72 Edit Distance Solution Hard Dynamic Programming
71 Simplify Path Solution Medium Stack
70 Climbing Stairs Solution Easy Dynamic Programming
68 Text Justification Solution Hard String, Simulation
67 Add Binary Solution Easy Math, String, Bit Manipulation
64 Minimum Path Sum Solution Medium Dynamic Programming
63 Unique Paths II Solution Medium Dynamic Programming
62 Unique Paths Solution Medium Dynamic Programming
61 Rotate List Solution Medium Linked List, Two Pointers
59 Spiral Matrix II Solution Medium Array, Matrix
57 Insert Interval Solution Medium Array
56 Merge Intervals Solution Medium Array
55 Jump Game Solution Medium Dynamic Programming
54 Spiral Matrix Solution Medium Array, Matrix
53 Maximum Subarray Solution Easy Array
52 N-Queens II Solution Hard Backtracking
51 N-Queens Solution Hard Backtracking, Array
49 Group Anagrams Solution Medium String
48 Rotate Image Solution Medium Array, Matrix
47 Permutations II Solution Medium Backtracking
46 Permutations Solution Medium Backtracking
45 Jump Game II Solution Medium Dynamic Programming
42 Trapping Rain Water Solution Hard Dynamic Programming
41 First Missing Positive Solution Hard Array
40 Combination Sum II Solution Medium Array, Backtracking
39 Combination Sum Solution Medium Array, Backtracking
37 Sudoku Solver Solution Medium Array, Matrix, Backtracking
36 Valid Sudoku Solution Medium Array, Matrix
35 Search Insert Position Solution Easy Array, Binary Search
33 Search In Rotated Sorted Array Solution Medium Array, Binary Search
32 Longest Valid Parentheses Solution Hard String, Two Pointers
31 Next Permutation Solution Medium Array, Two Pointers
29 Divide Two Integers Solution Medium Bit Manipulation, Math
27 Remove Element Solution Easy Array
26 Remove Duplicates In Sorted Array Solution Easy Array
24 Swap Nodes in Pairs Solution Easy Linked List
23 Merge K Sorted Lists Solution Hard Linked List
22 Generate Parentheses Solution Medium Backtracking
21 Merge Two Sorted Lists Solution Easy Linked List
20 Valid Parentheses Solution Easy Stack
19 Remove Nth Node From End Of List Solution Medium Linked List
17 Letter Combinations Of A Phone Number Solution Medium String, Recursion
15 3 Sum Solution Medium Array
14 Longest Common Prefix Solution Easy String
13 Roman To Integer Solution Easy Math
12 Integer Roman Solution Medium Math
11 Container With Most Water Solution Medium Array, Greedy
9 Palindrome Number Solution Easy Math
8 String To Integer (atoi) Solution Medium String
7 Reverse Integer Solution Medium Math
6 Zigzag Conversion Solution Medium String, Simulation
5 Longest Palindromic Substring Solution Medium String, Two Pointers
4 Median Of Two Sorted Arrays Solution Hard Array, Binary Search
3 Longest Substring Without Repeating Characters Solution Medium String, Sliding Window
2 Add Two Numbers Solution Medium Linked List
1 Two Sum Solution Easy Array

Work At Tech

Arrays

# Title Solutions Difficulty Tag
1 Cumulative Sum Solution Easy Arrays
2 Positive Cumulative Sum Solution Easy Arrays
3 Identical Twins Solution Easy Arrays

Binary Trees

# Title Solutions Difficulty Tag
1 Binary Tree Inorder Traversal Solution Easy Binary Trees

Dynamic Programming

# Title Solutions Difficulty Tag
1 Climbing Stairs Solution Easy Dynamic Programming
2 Longest Increasing Subsequence (LIS) Solution Medium Dynamic Programming
3 Longest Common Subsequence (LCS) Solution Medium Dynamic Programming
4 Maximum Sum Increasing Subsequence Solution Medium Dynamic Programming
5 Longest Palindromic Substring (LPS) Solution Medium Dynamic Programming
6 Edit Distance (Levenshtein Distance) Solution Medium Dynamic Programming
7 Collect Jewels Solution Medium Dynamic Programming
8 Subset Sum Solution Medium Dynamic Programming
9 Subset Sum 2 Solution Medium Dynamic Programming
10 Maximum Path Sum In Matrix Solution Medium Dynamic Programming
11 Rod Cutting Solution Medium Dynamic Programming
12 Coin Change Solution Medium Dynamic Programming
13 Decode Ways Solution Medium Dynamic Programming
14 Unique Paths Solution Medium Dynamic Programming
15 Maximum Product Subarray Solution Medium Dynamic Programming

Graph

# Title Solutions Difficulty Tag
1 Adjacency List To Adjacency Matrix Solution Easy Graph
2 Adjacency Matrix To Adjacency List Solution Easy Graph
3 Edges To Adjacency Matrix Solution Easy Graph
4 Edges To Adjacency List Solution Easy Graph
5 DFS Of An Acyclic Graph Solution Medium Graph
6 DFS Of A Cyclic Graph Solution Medium Graph
7 BFS Of A Graph Solution Medium Graph
8 Clone A Graph Solution Medium Graph
9 Detect Cycle In Directed Graph Solution Medium Graph
10 Detect Cycle In Undirected Graph Solution Medium Graph
11 Valid Course Schedule Solution Medium Graph
12 Paths Exists In Directed Graph Solution Medium Graph
13 Flood Fill Image Solution Easy Graph
14 Number Of Islands Solution Medium Graph
15 Valid Path Solution Medium Graph
16 Capture Surrounded Regions Solution Medium Graph
18 Knight's Journey On A Chess Board Solution Medium Graph
19 Word Search Board Solution Medium Graph
21 Word Ladder Solution Hard Graph

Greedy Algorithm

# Title Solutions Difficulty Tag
1 Max Meetings In A Room Solution Medium Greedy
2 Sack Of Grains Solution Medium Greedy
3 Tasks For Profit Solution Medium Greedy
4 Trains And Platforms Solution Medium Greedy

About

This repository contains my solutions to problems in different online judge platforms such as LeetCode, Work@Tech, etc. 425+ solved LeetCode problems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages