Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Pinterest
Share On Reddit
Share On Stumbleupon
Contact us
Hide Buttons

All Articles

Lev­els: Begin­ner Inter­me­di­ate Expert

Dynamic Pro­gram­ming

21 Dynamic Pro­gram­ming — Edit Dis­tance Prob­lem Intermediate
20 Dynamic Pro­gram­ming — Coin In a Line Game Prob­lem Intermediate
19 Dynamic Pro­gram­ming — Box Stack­ing Prob­lem Intermediate
18 Dynamic Pro­gram­ming — Split the String into Min­i­mum num­ber of Palin­dromes Intermediate
17 Dynamic Pro­gram­ming — High­way Bill­board Prob­lem Intermediate
16 Dynamic Pro­gram­ming — Max­i­mum Sub­ar­ray Prob­lem Intermediate
15 Dynamic Pro­gram­ming — Longest Palin­dromic Sub­se­quence Intermediate
14 Dynamic Pro­gram­ming — Max­i­mum Prod­uct Cut­ting Prob­lem Intermediate
13 Dynamic Pro­gram­ming — Min­i­mum Num­bers are Required Whose Square Sum is Equal To a Given Num­ber Expert
12 Dynamic Pro­gram­ming — Longest Com­mon Sub­string Expert
11 Dynamic Pro­gram­ming — Coin Change Prob­lem Beginner
10 Dynamic Pro­gram­ming — Min­i­mum Cost Path Prob­lem Beginner
9 Dynamic Pro­gram­ming — Longest Com­mon Sub­se­quence Intermediate
8 Dynamic Pro­gram­ming — Rod Cut­ting Prob­lem Intermediate
7 Dynamic Pro­gram­ming —The Word Break Prob­lem Expert
6 Dynamic Pro­gram­ming — Sub­set Sum Prob­lemExpert
5 Dynamic Pro­gram­ming — Max­i­mum size square sub-matrix with all 1sInter­me­di­ate
4 Dynamic Pro­gram­ming — Longest Increas­ing Sub­se­quenceInter­me­di­ate
3 Dynamic Pro­gram­ming — Stairs Climb­ing Puz­zleBegin­ner
2 Dynamic Pro­gram­ming — Min­i­mum Coin Change Prob­lemInter­me­di­ate
1 Intro­duc­tion To Dynamic Pro­gram­ming — Fibonacci Series

Begin­ner

Back­track­ing

9 The Word Break Prob­lemExpert
8 Print All The Per­mu­ta­tions Of a StringExpert
7 Knight’s Tour Prob­lemExpert
6 Search a Word In a MatrixExpert
5 N Queens Prob­lem — Bet­ter Solu­tion Expert
4 N Queens Prob­lemExpert
3 Rat In A Maze Puz­zleExpert
2 SUDOKU SolverExpert
1 Intro­duc­tion To Back­track­ing Pro­gram­mingBegin­ner

Threaded Binary Tree

4 Con­vert Binary Tree into Threaded Binary Tree
3 Dou­ble Threaded Binary Tree Com­plete Implementation
2 Sin­gle Threaded Binary Tree Com­plete Implementation
1 Intro­duc­tion to Threaded Binary Tree

Trees/ Binary Tree/ Binary Search Tree

72 Con­vert BST to Greater Sum Tree
71 Get the Sum of all left leaves in a Binary tree
70 Con­vert binary tree to its Sum tree
69 Binary Tree-Postorder Tra­ver­sal — Non Recur­sive Approach
68 Binary Tree — Pre­order Tra­ver­sal — Non Recur­sive Approach
67 Binary Tree-Inorder Tra­ver­sal — Non Recur­sive Approach
66 Delete the Binary Tree
65 Search the Ele­ment in a binary tree — With and With­out Recursion
64 Tree Tra­ver­sals
63 Find the Size of a Binary Tree with­out Recursion
62 Merge K Sorted ArraysExpert
61 Breadth-First Search/Traversal in a Binary TreeBegin­ner
60 Diam­e­ter Of a Binary TreeExpert
59 Pro­vide the Next Sib­lings Point­ers in a Given Binary TreeExpert
58 Find the Deep­est Left Node in a Binary Tree.Inter­me­di­ate
57 Find the Max ele­ment in a Given Binary TreeBegin­ner
56 Check If One Binary is Mir­ror Tree of another Binary Tree.Begin­ner
55 Find If Path Exist in Binary Tree with Sum=XInter­me­di­ate
54 Reverse Level Order Tra­ver­salInter­me­di­ate
53 Find the Deep­est Node in a Binary Tree.Inter­me­di­ate
52 Find the Height of a tree with­out Recur­sionInter­me­di­ate
51 Print All The Full Nodes in a Binary TreeInter­me­di­ate
50 Binary Min — Max HeapExpert
49 Print the Bot­tom View of a Binary TreeInter­me­di­ate
48 AVL Tree — Inser­tionExpert
47 Con­struct a binary tree from given Inorder and Level Order Tra­ver­salExpert
46 Con­struct Binary Search Tree from a given Pre­order Tra­ver­sal Using Stack (With­out Recur­sion)Expert
45 Con­struct Binary Search Tree from a given Pre­order Tra­ver­sal using Recur­sionExpert
44 Print The Top View of a Binary TreeInter­me­di­ate
43 Con­struct a Binary Tree from Given Inorder and Depth-First-Search.Expert
42 Depth First Search/Traversal in Binary TreeBegin­ner
41 Inorder Pre­de­ces­sor and Suc­ces­sor in Binary Search TreeExpert
40 Print All The Nodes Which are X dis­tance from the Leaf NodesInter­me­di­ate
39 Print All The Nodes Which are X dis­tance from the RootInter­me­di­ate
38 Find the Dis­tance between Two Nodes of a Binary Tree.Expert
37 Find The Dis­tance From Root To Given Node of a Binary Tree.Inter­me­di­ate
36 Con­struct a binary tree from given Inorder and Pos­torder Tra­ver­salExpert
35 Print the Ver­ti­cal Sum in binary Tree .Inter­me­di­ate
34 Print the Binary Tree in Ver­ti­cal Order Path.Inter­me­di­ate
33 Low­est Com­mon Ances­tor in a Binary Tree (Not Binary Search Tree).Expert
32 Low­est Com­mon Ances­tor in a Binary Search Tree.Inter­me­di­ate
31 Make a Binary Tree from Given Inorder and Pre­order Trav­eral.Expert
30 Given a binary tree, find out the max­i­mum sum of value from root to each leaf.Inter­me­di­ate
29 Reverse Alter­nate lev­els of a given Binary Tree.Inter­me­di­ate
28 Given a Sorted Singly Linked List Array, Con­vert it into a Bal­anced Binary search Tree.Inter­me­di­ate
27 Given a binary tree, Con­vert it into its Mir­ror TreeBegin­ner
26 Given a binary tree, Print All the Nodes that don’t have Sib­lings.Begin­ner
25 Con­vert a Sorted Dou­bly Linked List to Bal­anced BST.Inter­me­di­ate
24 Given a binary tree, Find the Max­i­mum Path Sum between Any Two LeavesInter­me­di­ate
23 Print Left View of a given binary treeInter­me­di­ate
22 Print Right View of a given binary treeInter­me­di­ate
21 In a Binary Tree, Check if Two nodes has the same par­ent or are sib­lingsInter­me­di­ate
20 In a Binary Tree, Check if two nodes are CousinsInter­me­di­ate
19 Check if Two BST’s are Iden­ti­calBegin­ner
18 Print Paths from root to all leaf nodes in a binary tree.Inter­me­di­ate
17 Print All Nodes Between Two Given Lev­elsInter­me­di­ate
16 Find the max­i­mum width of a binary treeInter­me­di­ate
15 Level Order Tra­ver­sal in Zig Zag pat­tern OR Print in Spi­ral Pat­ternExpert
14 Deter­mine whether given binary tree is binary search tree(BST) or notInter­me­di­ate
13 Find the Size of the Binary TreeBegin­ner
12 Given two binary trees, check if one binary tree is a sub­tree of anotherInter­me­di­ate
11 Print a path from Root to Node in Binary TreeInter­me­di­ate
10 Inorder Suc­ces­sor in Binary Search Tree with­out Using Par­ent linkExpert
9 Inorder Suc­ces­sor in Binary Search Tree Using Par­ent linkExpert
8 Inorder Suc­ces­sor in Binary TreeInter­me­di­ate
7 Sorted Array to Binary Search Tree of Min­i­mal HeightInter­me­di­ate
6 In a Binary Tree, Cre­ate Linked Lists of all the nodes at each depth.Expert
5 Level Order Tra­ver­sal, Print each level in sep­a­rate line.Inter­me­di­ate
4 Find whether if a Given Binary Tree is Bal­anced?Begin­ner
3 Get the Height of a Node in a Binary TreeBegin­ner
2 Find the Max­i­mum Depth OR Height of a Binary TreeBegin­ner
1 Binary Search Tree Com­plete Imple­men­ta­tion.Begin­ner

 

Linked List

26 Cir­cu­lar Linked List Com­plete Implementation
25 Dou­bly Linked List Com­plete Implementation
24 Imple­ment Stack Using Linked List
23 Reverse Alter­na­tive ‘k’ nodes in a Linked List.
22 Swap Nodes in pairs in a Linked List by chang­ing links
21 Reverse a Linked List in groups of given size ‘K’
20 Reverse The Dou­bly Linked ListInter­me­di­ate
19 Swap Kth Node from the front with the Kth Node from the EndInter­me­di­ate
18 Delete X Nodes After Y Nodes In a Linked ListBegin­ner
17 Merge Sort in a Linked listInter­me­di­ate
16 Merge a Linked list into another Linked List at Alter­nate Posi­tions.Inter­me­di­ate
15 Given a Sorted Singly Linked List Array, Con­vert it into a Bal­anced Binary search Tree.Inter­me­di­ate
14 Con­vert a Sorted Dou­bly Linked List to Bal­anced BST.Inter­me­di­ate
13 In a Binary Tree, Cre­ate Linked Lists of all the nodes at each depth.Expert
12 Add two num­bers rep­re­sented by a linked list, Num­bers are Stored in FORWARD orderInter­me­di­ate
11 Add two num­bers rep­re­sented by a linked list, Num­bers are Stored in REVERSE orderInter­me­di­ate
10 Reverse a Linked List — Part 2Begin­ner
9 Swap Every Kth Node in a LinkedListInter­me­di­ate
8 Delete a Node in the Mid­dle of a linked list, Given only access to that NodeBegin­ner
7 To find the kth to Last Ele­ment of a Singly Linked ListBegin­ner
6 Remove Dupli­cates from an Unsorted Linked listBegin­ner
5 Find Inter­sec­tion Point in Two Linked ListInter­me­di­ate
4 Find the Loop in a Linked list, find its length and Break the LoopInter­me­di­ate
3 Reverse a Linked ListBegin­ner
2 Merge or Com­bine Two Sorted Linked ListsInter­me­di­ate
1 Singly Linked List Imple­men­ta­tionBegin­ner

Arrays

59 Print All Diag­o­nals of a given matrix
58 Kadane’s Algo­rithm — Max­i­mum Sub­ar­ray Problem
57 Short­est Range in K-sorted Lists
56 Gen­er­ate Max­i­mum rev­enue by sell­ing K tick­ets from N windows
55 Print All Pos­si­ble Sub­sets with Sum equal to a given Num­berExpert
55 Print All N Length Strings from Given Num­ber KExpert
54 Gen­er­ate Well Ordered Pass­words of a Given Length KInter­me­di­ate
53 All N Length Strings from Given String of Length KExpert
52 Find the Kth Smallest/Largest Ele­ment in an ArrayBegin­ner
51 Pri­or­ity Queue Imple­men­ta­tionBegin­ner
50 Merge K Sorted ArraysExpert
49 Find a Miss­ing Num­ber From a Sequence of Con­sec­u­tive Num­bers | XOR MethodBegin­ner
48 Rearrange the Array of Given Range N, such that A[i]=iInter­me­di­ate
47 Find a Num­ber occur­ring odd num­ber of times in a Given arrayBegin­ner
46 Binary Min — Max HeapExpert
45 Magic Index — Find Index In Sorted Array Such That A[i] = i.Begin­ner
44 Print All Com­bi­na­tions of sub­set of size K from Given ArrayInter­me­di­ate
43 Print All the Sub­sets of a Given Set (Power Set)Expert
42 Con­struct a Spe­cial Tri­an­gle from a Given ArrayBegin­ner
41 Find Increas­ing Triplet Sub-sequenceInter­me­di­ate
40 Track the Max­i­mum Ele­ment in a Stack.Inter­me­di­ate
39 Print All Pos­si­ble Valid Com­bi­na­tions Of Paren­the­sis of Given ‘N’Expert
38 Count­ing SortInter­me­di­ate
37 Tow­ers Of HanoiBegin­ner
36 Find The Miss­ing Dupli­cate in a Given Array.Begin­ner
35 Sort 3 Inte­gers with­out using if con­di­tion OR use only Max() func­tion.Begin­ner
34 Euclid­ean algo­rithm — Great­est Com­mon Divisor(GCD)Begin­ner
33 Imple­ment Queue Using StacksBegin­ner
32 Depth First Search/Traversal in Binary TreeInter­me­di­ate
31 Check if Array is Con­sec­u­tive Inte­gersBegin­ner
30 In an Array, find the Con­tigu­ous Sub­ar­ray with Sum to a Given Value.Inter­me­di­ate
29 In an Array, find the Small­est Sub­ar­ray with Sum Greater than the Given ValueBegin­ner
28 Rearrange Pos­i­tive and Neg­a­tive Ele­ments at Alter­nate Posi­tions in an Array In O(1) Extra SpaceExpert
27 Find inter­sec­tion between Two Sorted Arrays.Begin­ner
26 Find Kth Small­est or Largest ele­ment in an Array.Inter­me­di­ate
25 Given an array arrA[], find the max­i­mum j – i such that arr[j] > arr[i].Inter­me­di­ate
24 Find All Ele­ments in an Array which appears more than N/K times, N is Array Size and k is a Num­ber.Expert
23 Search an Ele­ment in a Rotated Sorted ArrayInter­me­di­ate
22 Print All The Per­mu­ta­tions Of a StringExpert
21 Sort an Given Array in the order defined by another arrayInter­me­di­ate
20 Sort an Array such that the odd num­bers appear first fol­lowed by the even num­bers . The odd num­bers in ascend­ing order and the even num­bers in descend­ing order.Inter­me­di­ate
19 Find the num­ber of occur­rences of a num­ber in a given sorted array.Inter­me­di­ate
18 Find all com­mon num­bers in given three sorted arrays.Begin­ner
17 Find the first repeated ele­ment in an array by its indexInter­me­di­ate
16 Min­i­mum num­ber that can­not be formed by any sub­set of an arrayBegin­ner
15 Sorted Array to Binary Search Tree of Min­i­mal HeightInter­me­di­ate
14 Count All Paths from Top left to bot­tom right in Two Dimen­sional Array includ­ing Diag­o­nal PathsInter­me­di­ate
13 Print All Paths from Top left to bot­tom right in Two Dimen­sional ArrayInter­me­di­ate
12 Rearrange Pos­i­tive and Neg­a­tive Num­bers of Array On Each Side in O(nlogn)Expert
11 Find The Longest Sequence Of Pre­fix Shared By All The Words In A StringExpert
10 Print All Ele­ments of Two Dimen­sional Array in Spi­ralInter­me­di­ate
9 Given an array and a num­ber k, check for pair in array with sum as k in O(nlgn)Begin­ner
8 Quick Sort Imple­men­ta­tionInter­me­di­ate
7 Find an Ele­ment in 2 dimen­sional sorted arrayInter­me­di­ate
6 Find Whether Given String is palin­drome or Not.Begin­ner
5 Find a peak ele­ment in a Given ArrayBegin­ner
4 Find two Miss­ing Num­bers in a Sequence of Con­sec­u­tive Num­bersBegin­ner
3 Find a Miss­ing Num­ber From a Sequence of Con­sec­u­tive Num­bersBegin­ner
2 Merge Sort — Updated — Most Effi­cient ways to Imple­mentInter­me­di­ate
1 Binary SearchBegin­ner

Strings

11 Sort Names by their Last Names.Begin­ner
10 Print All Pos­si­ble Valid Com­bi­na­tions Of Paren­the­sis of Given ‘N’Expert
9 Gen­er­ate All Strings of n bits.Inter­me­di­ate
8 Print All The Per­mu­ta­tions Of a StringExpert
7 Check if one string is Rota­tion of another stringBegin­ner
6 String Com­pres­sion using count of repeated char­ac­ters — Run Length Encod­ingBegin­ner
5 Replace all spaces in a String with ‘%20′Inter­me­di­ate
4 Find Whether Two Strings are Per­mu­ta­tion of each otherInter­me­di­ate
3 Find The Longest Sequence Of Pre­fix Shared By All The Words In A StringExpert
2 Find Out Whether String Con­tains All The Unique Char­ac­tersBegin­ner
1 Find Whether Given Sequence of paren­the­ses are well formed.Inter­me­di­ate

MISC

5 Find num­bers which are palin­drome in both their dec­i­mal and octal Rep­re­sen­ta­tionsBegin­ner
4 Col­or­ful Num­bersExpert
3 Goldbach’s Con­jec­tureBegin­ner
2 Con­vert Dec­i­mal into Irre­ducible Frac­tionBegin­ner
1 Clock Angle Prob­lemBegin­ner