StatusTopic
SnoTopicFavTitleSolved
1ArrayReverse the array
2ArrayFind the maximum and minimum element in an array
3ArrayFind the "Kth" max and min element of an array
4ArrayGiven an array which consists of only 0, 1 and 2. Sort the array without using any sorting algo
5ArrayMove all the negative elements to one side of the array
6ArrayFind the Union and Intersection of the two sorted arrays.
7ArrayWrite a program to cyclically rotate an array by one.
8Arrayfind Largest sum contiguous Subarray [V. IMP]
9ArrayMinimise the maximum difference between heights [V.IMP]
10ArrayMinimum no. of Jumps to reach end of an array
11Arrayfind duplicate in an array of N+1 Integers
12ArrayMerge 2 sorted arrays without using Extra space.
13ArrayKadane's Algo [V.V.V.V.V IMP]
14ArrayMerge Intervals
15ArrayNext Permutation
16ArrayCount Inversion
17ArrayBest time to buy and Sell stock
18Arrayfind all pairs on integer array whose sum is equal to given number
19Arrayfind common elements In 3 sorted arrays
20ArrayRearrange the array in alternating positive and negative items with O(1) extra space
21ArrayFind if there is any subarray with sum equal to 0
22ArrayFind factorial of a large number
23Arrayfind maximum product subarray
24ArrayFind longest coinsecutive subsequence
25ArrayGiven an array of size n and a number k, fin all elements that appear more than " n/k " times.
26ArrayMaximum profit by buying and selling a share atmost twice
27ArrayFind whether an array is a subset of another array
28ArrayFind the triplet that sum to a given value
29ArrayTrapping Rain water problem
30ArrayChocolate Distribution problem
31ArraySmallest Subarray with sum greater than a given value
32ArrayThree way partitioning of an array around a given value
33ArrayMinimum swaps required bring elements less equal K together
34ArrayMinimum no. of operations required to make an array palindrome
35ArrayMedian of 2 sorted arrays of equal size
36ArrayMedian of 2 sorted arrays of different size
39MatrixSpiral traversal on a Matrix
40MatrixSearch an element in a matriix
41MatrixFind median in a row wise sorted matrix
42MatrixFind row with maximum no. of 1's
43MatrixPrint elements in sorted order using row-column wise sorted matrix
44MatrixMaximum size rectangle
45MatrixFind a specific pair in matrix
46MatrixRotate matrix by 90 degrees
47MatrixKth smallest element in a row-cpumn wise sorted matrix
48MatrixCommon elements in all rows of a given matrix
51StringReverse a String
52StringCheck whether a String is Palindrome or not
53StringFind Duplicate characters in a string
55StringWrite a Code to check whether one string is a rotation of another
56StringWrite a Program to check whether a string is a valid shuffle of two strings or not
57StringCount and Say problem
58StringWrite a program to find the longest Palindrome in a string.[ Longest palindromic Substring]
59StringFind Longest Recurring Subsequence in String
60StringPrint all Subsequences of a string.
61StringPrint all the permutations of the given string
62StringSplit the Binary string into two substring with equal 0’s and 1’s
63StringWord Wrap Problem [VERY IMP].
64StringEDIT Distance [Very Imp]
65StringFind next greater number with same set of digits. [Very Very IMP]
66StringBalanced Parenthesis problem.[Imp]
67StringWord break Problem[ Very Imp]
68StringRabin Karp Algo
69StringKMP Algo
70StringConvert a Sentence into its equivalent mobile numeric keypad sequence.
71StringMinimum number of bracket reversals needed to make an expression balanced.
72StringCount All Palindromic Subsequence in a given String.
73StringCount of number of given string in 2D character array
74StringSearch a Word in a 2D Grid of characters.
75StringBoyer Moore Algorithm for Pattern Searching.
76StringConverting Roman Numerals to Decimal
77StringLongest Common Prefix
78StringNumber of flips to make binary string alternate
79StringFind the first repeated word in string.
80StringMinimum number of swaps for bracket balancing.
81StringFind the longest common subsequence between two strings.
82StringProgram to generate all possible valid IP addresses from given string.
83StringWrite a program tofind the smallest window that contains all characters of string itself.
84StringRearrange characters in a string such that no two adjacent are same
85StringMinimum characters to be added at front to make string palindrome
86StringGiven a sequence of words, print all anagrams together
87StringFind the smallest window in a string containing all characters of another string
88StringRecursively remove all adjacent duplicates
89StringString matching where one string contains wildcard characters
90StringFunction to find Number of customers who could not get a computer
91StringTransform One String to Another using Minimum Number of Given Operation
92StringCheck if two given strings are isomorphic to each other
93StringRecursively print all sentences that can be formed from list of word lists
96Searching & SortingFind first and last positions of an element in a sorted array
97Searching & SortingFind a Fixed Point (Value equal to index) in a given array
98Searching & SortingSearch in a rotated sorted array
99Searching & Sortingsquare root of an integer
100Searching & SortingMaximum and minimum of an array using minimum number of comparisons
101Searching & SortingOptimum location of point to minimize total distance
102Searching & SortingFind the repeating and the missing
103Searching & Sortingfind majority element
104Searching & SortingSearching in an array where adjacent differ by at most k
105Searching & Sortingfind a pair with a given difference
106Searching & Sortingfind four elements that sum to a given value
107Searching & Sortingmaximum sum such that no 2 elements are adjacent
108Searching & SortingCount triplet with sum smaller than a given value
109Searching & Sortingmerge 2 sorted arrays
110Searching & Sortingprint all subarrays with 0 sum
111Searching & SortingProduct array Puzzle
112Searching & SortingSort array according to count of set bits
113Searching & Sortingminimum no. of swaps required to sort the array
114Searching & SortingBishu and Soldiers
115Searching & SortingRasta and Kheshtak
116Searching & SortingKth smallest number again
117Searching & SortingFind pivot element in a sorted array
118Searching & SortingK-th Element of Two Sorted Arrays
119Searching & SortingAggressive cows
120Searching & SortingBook Allocation Problem
121Searching & SortingEKOSPOJ:
122Searching & SortingJob Scheduling Algo
123Searching & SortingMissing Number in AP
124Searching & SortingSmallest number with atleastn trailing zeroes infactorial
125Searching & SortingPainters Partition Problem:
126Searching & SortingROTI-Prata SPOJ
127Searching & SortingDoubleHelix SPOJ
128Searching & SortingSubset Sums
129Searching & SortingFindthe inversion count
130Searching & SortingImplement Merge-sort in-place
131Searching & SortingPartitioning and Sorting Arrays with Many Repeated Entries
134LinkedListWrite a Program to reverse the Linked List. (Both Iterative and recursive)
135LinkedListReverse a Linked List in group of Given Size. [Very Imp]
136LinkedListWrite a program to Detect loop in a linked list.
137LinkedListWrite a program to Delete loop in a linked list.
138LinkedListFind the starting point of the loop. 
139LinkedListRemove Duplicates in a sorted Linked List.
140LinkedListRemove Duplicates in a Un-sorted Linked List.
141LinkedListWrite a Program to Move the last element to Front in a Linked List.
142LinkedListAdd “1” to a number represented as a Linked List.
143LinkedListAdd two numbers represented by linked lists.
144LinkedListIntersection of two Sorted Linked List.
145LinkedListIntersection Point of two Linked Lists.
146LinkedListMerge Sort For Linked lists.[Very Important]
147LinkedListQuicksort for Linked Lists.[Very Important]
148LinkedListFind the middle Element of a linked list.
149LinkedListCheck if a linked list is a circular linked list.
150LinkedListSplit a Circular linked list into two halves.
151LinkedListWrite a Program to check whether the Singly Linked list is a palindrome or not.
152LinkedListDeletion from a Circular Linked List.
153LinkedListReverse a Doubly Linked list.
154LinkedListFind pairs with a given sum in a DLL.
155LinkedListCount triplets in a sorted DLL whose sum is equal to given value “X”.
156LinkedListSort a “k”sorted Doubly Linked list.[Very IMP]
157LinkedListRotate DoublyLinked list by N nodes.
158LinkedListRotate a Doubly Linked list in group of Given Size.[Very IMP]
161LinkedListFlatten a Linked List
162LinkedListSort a LL of 0's, 1's and 2's
163LinkedListClone a linked list with next and random pointer
164LinkedListMerge K sorted Linked list
165LinkedListMultiply 2 no. represented by LL
166LinkedListDelete nodes which have a greater value on right side
167LinkedListSegregate even and odd nodes in a Linked List
168LinkedListProgram for n’th node from the end of a Linked List
169LinkedListFind the first non-repeating character from a stream of characters
172Binary Treeslevel order traversal
173Binary TreesReverse Level Order traversal
174Binary TreesHeight of a tree
175Binary TreesDiameter of a tree
176Binary TreesMirror of a tree
177Binary TreesInorder Traversal of a tree both using recursion and Iteration
178Binary TreesPreorder Traversal of a tree both using recursion and Iteration
179Binary TreesPostorder Traversal of a tree both using recursion and Iteration
180Binary TreesLeft View of a tree
181Binary TreesRight View of Tree
182Binary TreesTop View of a tree
183Binary TreesBottom View of a tree
184Binary TreesZig-Zag traversal of a binary tree
185Binary TreesCheck if a tree is balanced or not
186Binary TreesDiagnol Traversal of a Binary tree
187Binary TreesBoundary traversal of a Binary tree
188Binary TreesConstruct Binary Tree from String with Bracket Representation
189Binary TreesConvert Binary tree into Doubly Linked List
190Binary TreesConvert Binary tree into Sum tree
191Binary TreesConstruct Binary tree from Inorder and preorder traversal
192Binary TreesFind minimum swaps required to convert a Binary tree into BST
193Binary TreesCheck if Binary tree is Sum tree or not
194Binary TreesCheck if all leaf nodes are at same level or not
195Binary TreesCheck if a Binary Tree contains duplicate subtrees of size 2 or more [ IMP ]
196Binary TreesCheck if 2 trees are mirror or not
197Binary TreesSum of Nodes on the Longest path from root to leaf node
198Binary TreesCheck if given graph is tree or not. [ IMP ]
199Binary TreesFind Largest subtree sum in a tree
200Binary TreesMaximum Sum of nodes in Binary tree such that no two are adjacent
201Binary TreesPrint all "K" Sum paths in a Binary tree
202Binary TreesFind LCA in a Binary tree
203Binary TreesFind distance between 2 nodes in a Binary tree
204Binary TreesKth Ancestor of node in a Binary tree
205Binary TreesFind all Duplicate subtrees in a Binary tree [ IMP ]
206Binary TreesTree Isomorphism Problem
209Binary Search TreesFina a value in a BST
210Binary Search TreesDeletion of a node in a BST
211Binary Search TreesFind min and max value in a BST
212Binary Search TreesFind inorder successor and inorder predecessor in a BST
213Binary Search TreesCheck if a tree is a BST or not
214Binary Search TreesPopulate Inorder successor of all nodes
215Binary Search TreesFind LCA of 2 nodes in a BST
216Binary Search TreesConstruct BST from preorder traversal
217Binary Search TreesConvert Binary tree into BST
218Binary Search TreesConvert a normal BST into a Balanced BST
219Binary Search TreesMerge two BST [ V.V.V>IMP ]
220Binary Search TreesFind Kth largest element in a BST
221Binary Search TreesFind Kth smallest element in a BST
222Binary Search TreesCount pairs from 2 BST whose sum is equal to given value "X"
223Binary Search TreesFind the median of BST in O(n) time and O(1) space
224Binary Search TreesCount BST ndoes that lie in a given range
225Binary Search TreesReplace every element with the least greater element on its right
226Binary Search TreesGiven "n" appointments, find the conflicting appointments
227Binary Search TreesCheck preorder is valid or not
228Binary Search TreesCheck whether BST contains Dead end
229Binary Search TreesLargest BST in a Binary Tree [ V.V.V.V.V IMP ]
230Binary Search TreesFlatten BST to sorted list
233GreedyActivity Selection Problem
234GreedyJob SequencingProblem
235GreedyHuffman Coding
236GreedyWater Connection Problem
237GreedyFractional Knapsack Problem
238GreedyGreedy Algorithm to find Minimum number of Coins
239GreedyMaximum trains for which stoppage can be provided
240GreedyMinimum Platforms Problem
241GreedyBuy Maximum Stocks if i stocks can be bought on i-th day
242GreedyFind the minimum and maximum amount to buy all N candies
243GreedyMinimize Cash Flow among a given set of friends who have borrowed money from each other
244GreedyMinimum Cost to cut a board into squares
245GreedyCheck if it is possible to survive on Island
246GreedyFind maximum meetings in one room
247GreedyMaximum product subset of an array
248GreedyMaximize array sum after K negations
249GreedyMaximize the sum of arr[i]*i
250GreedyMaximum sum of absolute difference of an array
251GreedyMaximize sum of consecutive differences in a circular array
252GreedyMinimum sum of absolute difference of pairs of two arrays
253GreedyProgram for Shortest Job First (or SJF) CPU Scheduling
254GreedyProgram for Least Recently Used (LRU) Page Replacement algorithm
255GreedySmallest subset with sum greater than all other elements
256GreedyChocolate Distribution Problem
257GreedyDEFKIN -Defense of a Kingdom
258GreedyDIEHARD -DIE HARD
259GreedyGERGOVIA -Wine trading in Gergovia
260GreedyPicking Up Chicks
261GreedyCHOCOLA –Chocolate
262GreedyARRANGE -Arranging Amplifiers
263GreedyK Centers Problem
264GreedyMinimum Cost of ropes
265GreedyFind smallest number with given number of digits and sum of digits
266GreedyRearrange characters in a string such that no two adjacent are same
267GreedyFind maximum sum possible equal sum of three stacks
270BackTrackingRat in a maze Problem
271BackTrackingPrinting all solutions in N-Queen Problem
272BackTrackingWord Break Problem using Backtracking
273BackTrackingRemove Invalid Parentheses
274BackTrackingSudoku Solver
275BackTrackingm Coloring Problem
276BackTrackingPrint all palindromic partitions of a string
277BackTrackingSubset Sum Problem
278BackTrackingThe Knight’s tour problem
279BackTrackingTug of War
280BackTrackingFind shortest safe route in a path with landmines
281BackTrackingCombinational Sum
282BackTrackingFind Maximum number possible by doing at-most K swaps
283BackTrackingPrint all permutations of a string
284BackTrackingFind if there is a path of more than k length from a source
285BackTrackingLongest Possible Route in a Matrix with Hurdles
286BackTrackingPrint all possible paths from top left to bottom right of a mXn matrix
287BackTrackingPartition of a set intoK subsets with equal sum
288BackTrackingFind the K-th Permutation Sequence of first N natural numbers
291Stacks & QueuesImplement Stack from Scratch
292Stacks & QueuesImplement Queue from Scratch
293Stacks & QueuesImplement 2 stack in an array
294Stacks & Queuesfind the middle element of a stack
295Stacks & QueuesImplement "N" stacks in an Array
296Stacks & QueuesCheck the expression has valid or Balanced parenthesis or not.
297Stacks & QueuesReverse a String using Stack
298Stacks & QueuesDesign a Stack that supports getMin() in O(1) time and O(1) extra space.
299Stacks & QueuesFind the next Greater element
300Stacks & QueuesThe celebrity Problem
301Stacks & QueuesArithmetic Expression evaluation
302Stacks & QueuesEvaluation of Postfix expression
303Stacks & QueuesImplement a method to insert an element at its bottom without using any other data structure.
304Stacks & QueuesReverse a stack using recursion
305Stacks & QueuesSort a Stack using recursion
306Stacks & QueuesMerge Overlapping Intervals
307Stacks & QueuesLargest rectangular Area in Histogram
308Stacks & QueuesLength of the Longest Valid Substring
309Stacks & QueuesExpression contains redundant bracket or not
310Stacks & QueuesImplement Stack using Queue
311Stacks & QueuesImplement Stack using Deque
312Stacks & QueuesStack Permutations (Check if an array is stack permutation of other)
313Stacks & QueuesImplement Queue using Stack
314Stacks & QueuesImplement "n" queue in an array
315Stacks & QueuesImplement a Circular queue
316Stacks & QueuesLRU Cache Implementationa
317Stacks & QueuesReverse a Queue using recursion
318Stacks & QueuesReverse the first “K” elements of a queue
319Stacks & QueuesInterleave the first half of the queue with second half
320Stacks & QueuesFind the first circular tour that visits all Petrol Pumps
321Stacks & QueuesMinimum time required to rot all oranges
322Stacks & QueuesDistance of nearest cell having 1 in a binary matrix
323Stacks & QueuesFirst negative integer in every window of size “k”
324Stacks & QueuesCheck if all levels of two trees are anagrams or not.
325Stacks & QueuesSum of minimum and maximum elements of all subarrays of size “k”.
326Stacks & QueuesMinimum sum of squares of character counts in a given string after removing “k” characters.
327Stacks & QueuesQueue based approach or first non-repeating character in a stream.
328Stacks & QueuesNext Smaller Element
331HeapImplement a Maxheap/MinHeap using arrays and recursion.
332HeapSort an Array using heap. (HeapSort)
333HeapMaximum of all subarrays of size k.
334Heap“k” largest element in an array
335HeapKth smallest and largest element in an unsorted array
336HeapMerge “K” sorted arrays. [ IMP ]
337HeapMerge 2 Binary Max Heaps
338HeapKth largest sum continuous subarrays
339HeapLeetcode- reorganize strings
340HeapMerge “K” Sorted Linked Lists [V.IMP]
341HeapSmallest range in “K” Lists
342HeapMedian in a stream of Integers
343HeapCheck if a Binary Tree is Heap
344HeapConnect “n” ropes with minimum cost
345HeapConvert BST to Min Heap
346HeapConvert min heap to max heap
347HeapRearrange characters in a string such that no two adjacent are same.
348HeapMinimum sum of two numbers formed from digits of an array
351GraphCreate a Graph, print it
352GraphImplement BFS algorithm
353GraphImplement DFS Algo
354GraphDetect Cycle in Directed Graph using BFS/DFS Algo
355GraphDetect Cycle in UnDirected Graph using BFS/DFS Algo
356GraphSearch in a Maze
357GraphMinimum Step by Knight
358Graphflood fill algo
359GraphClone a graph
360GraphMaking wired Connections
361Graphword Ladder
362GraphDijkstra algo
363GraphImplement Topological Sort
364GraphMinimum time taken by each job to be solved given by a Directed Acyclic Graph
365GraphFind whether it is possible to finish all tasks or not from given dependencies
366GraphFind the no. of Isalnds
367GraphGiven a sorted Dictionary of an Alien Language, find order of characters
368GraphImplement Kruksal’sAlgorithm
369GraphImplement Prim’s Algorithm
370GraphTotal no. of Spanning tree in a graph
371GraphImplement Bellman Ford Algorithm
372GraphImplement Floyd warshallAlgorithm
373GraphTravelling Salesman Problem
374GraphGraph ColouringProblem
375GraphSnake and Ladders Problem
376GraphFind bridge in a graph
377GraphCount Strongly connected Components(Kosaraju Algo)
378GraphCheck whether a graph is Bipartite or Not
379GraphDetect Negative cycle in a graph
380GraphLongest path in a Directed Acyclic Graph
381GraphJourney to the Moon
382GraphCheapest Flights Within K Stops
383GraphOliver and the Game
384GraphWater Jug problem using BFS
385GraphWater Jug problem using BFS
386GraphFind if there is a path of more thank length from a source
387GraphM-ColouringProblem
388GraphMinimum edges to reverse o make path from source to destination
389GraphPaths to travel each nodes using each edge(Seven Bridges)
390GraphVertex Cover Problem
391GraphChinese Postman or Route Inspection
392GraphNumber of Triangles in a Directed and Undirected Graph
393GraphMinimise the cashflow among a given set of friends who have borrowed money from each other
394GraphTwo Clique Problem
397TrieConstruct a trie from scratch
398TrieFind shortest unique prefix for every word in a given list
399TrieWord Break Problem | (Trie solution)
400TrieGiven a sequence of words, print all anagrams together
401TrieImplement a Phone Directory
402TriePrint unique rows in a given boolean matrix
405Dynamic ProgrammingCoin ChangeProblem
406Dynamic ProgrammingKnapsack Problem
407Dynamic ProgrammingBinomial CoefficientProblem
408Dynamic ProgrammingPermutation CoefficientProblem
409Dynamic ProgrammingProgram for nth Catalan Number
410Dynamic ProgrammingMatrix Chain Multiplication 
411Dynamic ProgrammingEdit Distance
412Dynamic ProgrammingSubset Sum Problem
413Dynamic ProgrammingFriends Pairing Problem
414Dynamic ProgrammingGold Mine Problem
415Dynamic ProgrammingAssembly Line SchedulingProblem
416Dynamic ProgrammingPainting the Fenceproblem
417Dynamic ProgrammingMaximize The Cut Segments
418Dynamic ProgrammingLongest Common Subsequence
419Dynamic ProgrammingLongest Repeated Subsequence
420Dynamic ProgrammingLongest Increasing Subsequence
421Dynamic ProgrammingSpace Optimized Solution of LCS
422Dynamic ProgrammingLCS (Longest Common Subsequence) of three strings
423Dynamic ProgrammingMaximum Sum Increasing Subsequence
424Dynamic ProgrammingCount all subsequences having product less than K
425Dynamic ProgrammingLongest subsequence such that difference between adjacent is one
426Dynamic ProgrammingMaximum subsequence sum such that no three are consecutive
427Dynamic ProgrammingEgg Dropping Problem
428Dynamic ProgrammingMaximum Length Chain of Pairs
429Dynamic ProgrammingMaximum size square sub-matrix with all 1s
430Dynamic ProgrammingMaximum sum of pairs with specific difference
431Dynamic ProgrammingMin Cost PathProblem
432Dynamic ProgrammingMaximum difference of zeros and ones in binary string
433Dynamic ProgrammingMinimum number of jumps to reach end
434Dynamic ProgrammingMinimum cost to fill given weight in a bag
435Dynamic ProgrammingMinimum removals from array to make max –min <= K
436Dynamic ProgrammingLongest Common Substring
437Dynamic ProgrammingCount number of ways to reacha given score in a game
438Dynamic ProgrammingCount Balanced Binary Trees of Height h
439Dynamic ProgrammingLargestSum Contiguous Subarray [V>V>V>V IMP ]
440Dynamic ProgrammingSmallest sum contiguous subarray
441Dynamic ProgrammingUnbounded Knapsack (Repetition of items allowed)
442Dynamic ProgrammingWord Break Problem
443Dynamic ProgrammingLargest Independent Set Problem
444Dynamic ProgrammingPartition problem
445Dynamic ProgrammingLongest Palindromic Subsequence
446Dynamic ProgrammingCount All Palindromic Subsequence in a given String
447Dynamic ProgrammingLongest Palindromic Substring
448Dynamic ProgrammingLongest alternating subsequence
449Dynamic ProgrammingWeighted Job Scheduling
450Dynamic ProgrammingCoin game winner where every player has three choices
451Dynamic ProgrammingCount Derangements (Permutation such that no element appears in its original position) [ IMPORTANT ]
452Dynamic ProgrammingMaximum profit by buying and selling a share at most twice [ IMP ]
453Dynamic ProgrammingOptimal Strategy for a Game
454Dynamic ProgrammingOptimal Binary Search Tree
455Dynamic ProgrammingPalindrome PartitioningProblem
456Dynamic ProgrammingWord Wrap Problem
457Dynamic ProgrammingMobile Numeric Keypad Problem [ IMP ]
458Dynamic ProgrammingBoolean Parenthesization Problem
459Dynamic ProgrammingLargest rectangular sub-matrix whose sum is 0
460Dynamic ProgrammingLargest area rectangular sub-matrix with equal number of 1’s and 0’s [ IMP ]
461Dynamic ProgrammingMaximum sum rectangle in a 2D matrix
462Dynamic ProgrammingMaximum profit by buying and selling a share at most k times
463Dynamic ProgrammingFind if a string is interleaved of two other strings
464Dynamic ProgrammingMaximum Length of Pair Chain
467Bit ManipulationCount set bits in an integer
468Bit ManipulationFind the two non-repeating elements in an array of repeating elements
469Bit ManipulationCount number of bits to be flipped to convert A to B
470Bit ManipulationCount total set bits in all numbers from 1 to n
471Bit ManipulationProgram to find whether a no is power of two
472Bit ManipulationFind position of the only set bit
473Bit ManipulationCopy set bits in a range
474Bit ManipulationDivide two integers without using multiplication, division and mod operator
475Bit ManipulationCalculate square of a number without using *, / and pow()
476Bit ManipulationPower Set