Dynamic programming – 4 Keys Keyboard Problem | 2018-02-19 13:31:03 |

Minimum Copy Paste Operations | 2018-02-17 18:39:55 |

Count and print all Subarrays with product less than K in O(n) | 2018-02-12 23:10:46 |

Sliding Window Algorithm (Track the maximum of each subarray of size k) | 2018-02-10 18:38:00 |

Deque Implementation – Java | 2018-02-08 22:29:57 |

Print all sub sequences of a given String | 2018-02-05 22:23:27 |

Graph – Print all paths between source and destination | 2018-02-04 13:48:30 |

Graph – Depth First Traversal | 2018-02-01 22:19:03 |

Print all sub sequences of a given array | 2018-01-28 22:34:36 |

Print all substrings of a given string | 2018-01-26 00:08:36 |

Sum of all sub arrays in O(n) Time | 2018-01-22 18:09:42 |

Print all subarrays of a given array | 2018-01-19 17:47:19 |

Text Justification Problem | 2018-01-16 17:37:39 |

Dynamic Programming – Egg Dropping Problem | 2018-01-13 22:24:22 |

Nuts & Bolts Problem (Lock & Key problem) | 2018-01-10 20:29:28 |

Divide and Conquer – Rearrange array elements in special order | 2018-01-05 20:18:16 |

Dynamic programming – Printer Problem | 2018-01-01 12:57:02 |

Remove the duplicates from the given String | 2017-12-28 19:12:11 |

Find median of two sorted arrays of same size | 2017-12-23 14:01:30 |

Dynamic programming – Minimum Jumps to reach to end | 2017-12-17 13:42:17 |

Dynamic programming – Remove Boxes Problem | 2017-12-03 14:02:46 |

Find two non-repeating numbers in an array in O(n) time and O(1) space | 2017-10-29 09:24:47 |

Number of bit to be flipped to convert one number to another. | 2017-09-14 20:51:42 |

Separate even and odd integers in a given array | 2017-09-12 22:20:38 |

Find three elements in an array that sum to a zero. | 2017-09-11 22:10:00 |

All elements appears thrice and one element appears once. Find that element in O(n) time and O(1) space | 2017-09-07 19:56:04 |

Separate 0’s and 1’s in a given array | 2017-09-05 22:14:03 |

Find local minimum or local maximum in O(1). | 2017-09-04 14:27:54 |

Find three elements in an array that sum to a given value | 2017-09-03 22:09:56 |

Majority Element- Boyer–Moore majority vote algorithm | 2017-09-01 19:31:15 |

Majority Element – Part 1 | 2017-09-01 19:23:38 |

Find the local minima in a given array | 2017-09-01 19:15:53 |

Check whether the given number is a perfect square | 2017-08-26 23:15:50 |

Check if array is sorted using recursion | 2017-08-26 23:07:00 |

Find the Index from which 0 starts | 2017-08-26 23:01:16 |

Find the increasing OR decreasing point in an array | 2017-08-26 22:51:47 |

Find the only element in array which appears only once | 2017-08-26 22:43:36 |

Algorithm to calculate power(k,n). | 2017-08-26 22:35:13 |

Find remainder without using modulo operator | 2017-08-26 22:27:31 |

Swap two numbers without using extra variable | 2017-08-26 22:21:01 |

Number of 1’s in bit representation of a number | 2017-08-26 17:23:17 |

Stock Single Sell Problem – O(n) Solution | 2017-08-26 17:12:14 |

Maximum Subarray OR Largest Sum Contiguous Subarray Problem – Divide and Conquer | 2017-08-26 16:59:09 |

Maximum difference between two elements where larger element appears after the smaller element | 2017-07-30 16:24:30 |

Find the right most unset bit OR zero bit of a number | 2017-07-30 16:16:12 |

Find the two repeating elements in a given array | 6 Approaches | 2017-07-24 19:07:06 |

Find the right most set bit of a number | 2017-07-23 14:39:04 |

Find two elements whose sum is closest to zero | 2017-07-09 18:50:31 |

Find the element which appears maximum number of times in the array. | 2017-06-26 20:06:29 |

Find duplicates in an given array in O(n) time and O(1) extra space. | 2017-06-18 12:08:44 |

Find the last non repeating character in a given string. | 2017-06-11 19:21:28 |

Find the last repeating character in a given string. | 2017-05-29 20:34:49 |

Find the first non repeating character in a given string | 2017-05-27 15:08:59 |

Find the first repeating character in a given string | 2017-03-08 00:09:32 |

K-Means Algorithm | 2017-03-02 21:56:54 |

k-Nearest Neighbors | 2016-12-30 00:01:34 |

Find longest Snake sequence in a given matrix | 2016-08-08 00:24:22 |

Dynamic Programming – Count all paths in 2D Matrix with Obstructions in it | 2016-06-20 19:37:31 |

Dynamic Programming – Count all paths from top left to bottom right of a mXn matrix | 2016-06-19 10:29:43 |

Reverse the given Array without using built in function | 2016-06-19 10:17:23 |

Print All Diagonals of a given matrix | 2016-06-17 22:55:55 |

Dynamic Programming – Edit Distance Problem | 2016-05-14 20:11:10 |

Dynamic Programming – Coin In a Line Game Problem | 2016-05-08 18:08:55 |

Dynamic Programming – Box Stacking Problem | 2016-04-17 17:23:51 |

Dynamic Programming – Split the String into Minimum number of Palindromes. | 2016-04-10 12:20:39 |

Dynamic Programming – Highway Billboard Problem | 2016-04-05 14:20:47 |

Dynamic Programming – Maximum Subarray Problem | 2016-04-03 19:00:09 |

Kadane’s Algorithm – Maximum Subarray Problem | 2016-03-31 01:18:59 |

Convert Binary Tree into Threaded Binary Tree | 2016-03-24 18:55:05 |

Double Threaded Binary Tree Complete Implementation | 2016-03-21 20:53:09 |

Single Threaded Binary Tree Complete Implementation | 2016-03-19 16:56:28 |

Introduction to Threaded Binary Tree | 2016-03-19 16:33:38 |

Implement Stack Using Linked List | 2016-03-19 13:18:13 |

Doubly Linked List Complete Implementation | 2016-03-18 20:34:04 |

Circular Linked List Complete Implementation | 2016-03-15 23:18:33 |

Swap Nodes in pairs in a Linked List by changing links | 2016-03-13 20:09:38 |

Convert BST to Greater Sum Tree | 2016-02-27 20:45:26 |

Shortest Range in K-sorted Lists | 2016-02-19 22:54:24 |

Reverse Alternative ‘k’ nodes in a Linked List. | 2016-02-18 19:25:06 |

Reverse a Linked List in groups of given size ‘K’ | 2016-01-03 20:47:34 |

Generate Maximum revenue by selling K tickets from N windows | 2016-01-03 20:22:26 |

Get the Sum of all left leaves in a Binary tree | 2015-12-06 11:44:36 |

Convert binary tree to its Sum tree | 2015-12-06 11:32:11 |

Binary Tree-Postorder Traversal – Non Recursive Approach | 2015-12-05 14:57:45 |

Binary Tree – Preorder Traversal – Non Recursive Approach | 2015-12-05 12:33:53 |

Binary Tree-Inorder Traversal – Non Recursive Approach | 2015-12-04 23:59:57 |

Delete the Binary Tree | 2015-12-04 23:25:34 |

Search the Element in a binary tree – With and Without Recursion | 2015-12-04 23:10:45 |

Tree Traversals | 2015-11-08 13:01:11 |

Find the Size of a Binary Tree without Recursion | 2015-11-08 12:33:19 |

Dynamic Programming — Longest Palindromic Subsequence | 2015-08-04 22:15:53 |

Dynamic Programming – Maximum Product Cutting Problem. | 2015-07-11 10:16:50 |

Dynamic Programming – Minimum Numbers are Required Whose Square Sum is Equal To a Given Number | 2015-07-03 21:35:20 |

Dynamic Programming – Longest Common Substring | 2015-06-29 21:29:51 |

Dynamic Programming – Longest Common Subsequence | 2015-06-28 11:43:44 |

Dynamic Programming – Rod Cutting Problem | 2015-06-27 17:59:36 |

Dynamic Programming – Coin Change Problem | 2015-06-27 15:06:04 |

Dynamic Programming – Minimum Cost Path Problem | 2015-06-14 17:51:12 |

All N Length Strings from Given String of Length K | 2015-06-10 21:40:01 |

Generate Well Ordered Passwords of a Given Length K | 2015-06-10 21:34:53 |

Print All N Length Strings from Given Number K | 2015-06-10 21:19:49 |

Print All Possible Subsets with Sum equal to a given Number | 2015-06-08 20:56:00 |

Dynamic Programming – Maximum size square sub-matrix with all 1s | 2015-05-10 13:47:45 |

Dynamic Programming – Subset Sum Problem | 2015-05-10 13:34:32 |

The Word Break Problem | 2015-05-10 13:15:51 |

Dynamic Programming – Longest Increasing Subsequence | 2015-05-10 02:14:14 |

Backtracking – Knight’s Tour Problem | 2015-05-10 01:28:37 |

Backtracking – Search a Word In a Matrix | 2015-05-10 01:09:13 |

Backtracking – N Queens Problem – Better Solution | 2015-05-10 00:55:54 |

Backtracking – N Queens Problem | 2015-05-10 00:43:48 |

Find the Kth Smallest/Largest Element in an Array | 2015-05-10 00:31:22 |

Priority Queue Implementation | 2015-05-10 00:21:29 |

Find the Second Largest Element in an Array | 2015-05-09 23:52:38 |

Breadth-First Search/Traversal in a Graph. | 2015-05-09 23:44:09 |

Breadth-First Search/Traversal in a Binary Tree | 2015-05-09 23:16:32 |

Sort Names by their Last Names. | 2015-05-08 18:45:42 |

Backtracking – Rat In A Maze Puzzle | 2015-04-13 15:03:35 |

Backtracking – SUDOKU Solver | 2015-03-16 20:24:30 |

Introduction To Backtracking Programming | 2015-03-16 20:13:31 |

Dynamic Programming – Stairs Climbing Puzzle | 2015-03-16 20:04:44 |

Dynamic Programming – Minimum Coin Change Problem | 2015-03-16 19:57:27 |

Introduction To Dynamic Programming – Fibonacci Series | 2015-03-16 19:44:12 |

Merge K Sorted Arrays | 2015-03-14 15:33:24 |

Find the Deepest Left Node in a Binary Tree. | 2015-03-14 15:24:00 |

Find a Number occurring odd number of times in a Given array | 2015-03-14 15:11:50 |

Rearrange the Array of Given Range N, such that A[i]=i | 2015-03-14 15:06:50 |

Find a Missing Number From a Sequence of Consecutive Numbers | XOR Method | 2015-03-14 14:44:19 |

Find the Max element in a Given Binary Tree | 2015-03-14 14:40:48 |

Provide the Next Siblings Pointers in a Given Binary Tree | 2015-03-14 14:36:20 |

Check If One Binary is Mirror Tree of another Binary Tree. | 2015-03-14 14:21:10 |

Print All Paths From Root In a Binary Tree Whose Sum is Equal to a Given Number | 2015-03-14 14:14:08 |

Diameter Of a Binary Tree | 2015-03-14 14:08:57 |

Reverse Level Order Traversal | 2015-03-14 03:02:16 |

Find the Deepest Node in a Binary Tree. | 2015-03-14 02:15:48 |

Find the Height of a tree without Recursion | 2015-03-14 02:11:36 |

Print All The Full Nodes in a Binary Tree | 2015-03-14 02:02:33 |

Binary Min – Max Heap | 2015-02-22 17:21:28 |

Magic Index – Find Index In Sorted Array Such That A[i] = i. | 2015-02-22 17:06:00 |

Find numbers which are palindrome in both their decimal and octal Representations | 2015-02-22 16:02:07 |

Find All the Well Ordered Permutations of a Given String. | 2015-02-22 14:35:09 |

Find Increasing Triplet Sub-sequence | 2015-02-22 14:19:19 |

Construct a Special Triangle from a Given Array | 2015-02-22 14:10:01 |

Colorful Numbers | 2015-02-22 00:14:01 |

Print All the Subsets of a Given Set (Power Set) | 2015-02-21 23:59:01 |

Goldbach’s Conjecture | 2015-02-21 23:50:23 |

Convert Decimal into Irreducible Fraction | 2015-02-21 00:21:16 |

Clock Angle Problem | 2015-02-20 19:28:47 |

Print All Combinations of subset of size K from Given Array | 2015-02-20 19:07:29 |

Track the Maximum Element in a Stack. | 2015-02-16 16:24:07 |

Print All Possible Valid Combinations Of Parenthesis of Given ‘N’ | 2015-02-05 14:14:38 |

Graph Representation – Adjacency Matrix and Adjacency List | 2015-02-02 17:38:37 |

Counting Sort | 2015-02-02 16:21:13 |

Towers Of Hanoi | 2015-02-02 16:15:09 |

Generate All Strings of n bits. | 2015-02-01 15:57:18 |

Find The Missing Duplicate in a Given Array. | 2015-02-01 15:40:25 |

Sort 3 Integers without using if condition OR use only Max() function. | 2015-02-01 15:30:49 |

Euclidean algorithm – Greatest Common Divisor(GCD) | 2015-01-31 23:46:08 |

Implement Queue Using Stacks | 2015-01-31 23:38:08 |

Alternate Splitting of a given Linked List | 2015-01-31 23:03:46 |

Reverse The Doubly Linked List | 2015-01-31 21:48:00 |

Swap Kth Node from the front with the Kth Node from the End | 2015-01-31 21:25:09 |

Print the Bottom View of the Binary Tree. | 2015-01-30 03:38:05 |

Delete X Nodes After Y Nodes In a Linked List | 2015-01-29 13:11:27 |

Merge Sort in a Linked list | 2015-01-29 12:55:27 |

Merge a Linked list into another Linked List at Alternate Positions. | 2015-01-05 20:22:52 |

AVL Tree – Insertion | 2014-12-30 23:10:35 |

Construct a binary tree from given Inorder and Level Order Traversal | 2014-12-30 21:46:58 |

Construct Binary Search Tree from a given Preorder Traversal Using Stack (Without Recursion) | 2014-12-30 05:55:03 |

Construct Binary Search Tree from a given Preorder Traversal using Recursion | 2014-12-30 05:45:40 |

Print The Top View of a Binary Tree | 2014-12-30 05:29:07 |

Construct a Binary Tree from Given Inorder and Depth-First-Search. | 2014-12-30 05:16:11 |

Depth First Search/Traversal in Binary Tree | 2014-12-30 05:03:06 |

Inorder Predecessor and Successor in Binary Search Tree | 2014-12-29 22:08:55 |

Check if Array Contains All Elements Of Some Given Range | 2014-12-29 20:44:38 |

Check if Array is Consecutive Integers | 2014-12-29 20:37:11 |

In an Array, find the Contiguous Subarray with Sum to a Given Value. | 2014-12-29 20:28:35 |

In an Array, find the Smallest Subarray with Sum Greater than the Given Value | 2014-12-29 20:18:37 |

Rearrange Positive and Negative Elements at Alternate Positions in an Array In O(1) Extra Space | 2014-12-28 06:21:34 |

Find intersection between Two Sorted Arrays. | 2014-12-28 06:09:47 |

Find Kth Smallest or Largest element in an Array. | 2014-12-28 06:02:44 |

Given an array arrA[], find the maximum j – i such that arr[j] > arr[i]. | 2014-12-28 05:53:26 |

Find All Elements in an Array which appears more than N/K times, N is Array Size and k is a Number. | 2014-12-28 03:15:17 |

Search an Element in a Rotated Sorted Array | 2014-12-28 02:53:10 |

Print All The Nodes Which are X distance from the Given Node | 2014-12-08 23:37:27 |

Print All The Nodes Which are X distance from the Leaf Nodes | 2014-12-08 23:24:13 |

Print All The Nodes Which are X distance from the Root | 2014-12-08 23:16:50 |

Find the Distance between Two Nodes of a Binary Tree. | 2014-12-08 23:05:02 |

Find The Distance From Root To Given Node of a Binary Tree. | 2014-12-08 22:55:07 |

Construct a binary tree from given Inorder and Postorder Traversal | 2014-12-08 22:44:15 |

Print the Vertical Sum in binary Tree . | 2014-12-08 22:19:30 |

Print the Binary Tree in Vertical Order Path. | 2014-12-08 22:11:03 |

Lowest Common Ancestor in a Binary Tree (Not Binary Search Tree). | 2014-11-18 08:52:45 |

Lowest Common Ancestor in a Binary Search Tree. | 2014-11-18 08:28:54 |

Make a Binary Tree from Given Inorder and Preorder Traveral. | 2014-11-18 08:06:33 |

Given a binary tree, find out the maximum sum of value from root to each leaf. | 2014-11-18 07:50:13 |

Reverse Alternate levels of a given Binary Tree. | 2014-11-18 07:28:37 |

Given a Sorted Singly Linked List Array, Convert it into a Balanced Binary search Tree. | 2014-11-18 07:03:24 |

Given a binary tree, Convert it into its Mirror Tree | 2014-11-18 03:46:41 |

Given a binary tree, Print All the Nodes that don’t have Siblings. | 2014-11-18 02:46:53 |

Convert a Sorted Doubly Linked List to Balanced BST. | 2014-11-18 02:30:44 |

Given a binary tree, Find the Maximum Path Sum between Any Two Leaves | 2014-11-18 01:00:34 |

Print Left View of a given binary tree | 2014-11-18 00:46:23 |

Print Right View of a given binary tree | 2014-11-17 23:33:25 |

In a Binary Tree, Check if Two nodes has the same parent or are siblings | 2014-11-17 23:12:16 |

In a Binary Tree, Check if two nodes are Cousins | 2014-11-17 22:46:45 |

Check if Two BST’s are Identical | 2014-11-17 21:45:02 |

Print Paths from root to all leaf nodes in a binary tree. | 2014-11-17 21:14:09 |

Print All The Permutations Of a String | 2014-11-14 22:06:29 |

Sort an Given Array in the order defined by another array | 2014-11-14 21:02:52 |

Sort an Array such that the odd numbers appear first followed by the even numbers . The odd numbers in ascending order and the even numbers in descending order. | 2014-11-11 08:08:33 |

Print All Nodes Between Two Given Levels | 2014-11-11 07:54:34 |

Find the maximum width of a binary tree | 2014-11-11 05:23:43 |

Find the number of occurrences of a number in a given sorted array. | 2014-11-11 03:14:09 |

Find all common numbers in given three sorted arrays. | 2014-11-11 03:05:11 |

Level Order Traversal in Zig Zag pattern OR Print in Spiral Pattern | 2014-11-10 20:04:05 |

Find the first repeated element in an array by its index | 2014-11-10 18:58:58 |

Minimum number that cannot be formed by any subset of an array | 2014-11-10 18:21:30 |

Determine whether given binary tree is binary search tree(BST) or not | 2014-09-27 20:58:54 |

Find the Size of the Binary Tree | 2014-09-27 19:12:28 |

Given two binary trees, check if one binary tree is a subtree of another | 2014-09-27 18:18:22 |

Print a path from Root to Node in Binary Tree | 2014-09-27 18:04:50 |

Inorder Successor in Binary Search Tree without Using Parent link | 2014-09-27 16:46:09 |

Inorder Successor in Binary Search Tree Using Parent link | 2014-09-27 16:46:01 |

Inorder Successor in Binary Tree | 2014-09-27 16:45:50 |

Sorted Array to Binary Search Tree of Minimal Height | 2014-09-27 15:51:19 |

In a Binary Tree, Create Linked Lists of all the nodes at each depth. | 2014-09-22 21:38:14 |

Level Order Traversal, Print each level in separate line. | 2014-09-21 08:03:34 |

Find whether if a Given Binary Tree is Balanced? | 2014-09-21 01:16:54 |

Get the Height of a Node in a Binary Tree | 2014-09-20 17:05:05 |

Find the Maximum Depth OR Height of a Binary Tree | 2014-09-19 15:53:16 |

Add two numbers represented by a linked list, Numbers are Stored in FORWARD order | 2014-09-16 22:59:40 |

Add two numbers represented by a linked list, Numbers are Stored in REVERSE order | 2014-09-16 22:28:49 |

Reverse the binary representation of a number. | 2014-09-16 20:32:30 |

Binary Search Tree Complete Implementation. | 2014-09-16 00:38:04 |

Reverse a Linked List – Part 2 | 2014-09-14 03:13:55 |

Swap Every Kth Node in a LinkedList | 2014-09-14 03:02:40 |

Delete a Node in the Middle of a linked list, Given only access to that Node | 2014-09-12 17:16:37 |

Find the n’th Node from the end of a given Linked List | 2014-09-12 06:40:00 |

Remove Duplicates from an Unsorted Linked list | 2014-09-11 17:06:30 |

Check if one string is Rotation of another string | 2014-09-09 23:29:04 |

String Compression using count of repeated characters – Run Length Encoding | 2014-09-09 02:49:24 |

Replace all spaces in a String with ‘%20’ | 2014-09-08 05:26:30 |

Find Whether Two Strings are Permutation of each other | 2014-09-08 05:19:13 |

Find Intersection Point in Two Linked List | 2014-09-06 17:41:44 |

Find the Loop in a Linked list, find its length and Break the Loop | 2014-09-05 21:49:36 |

Reverse a Linked List | 2014-08-28 16:54:29 |

Count All Paths from Top left to bottom right in Two Dimensional Array including Diagonal Paths | 2014-08-25 04:11:48 |

Print All Paths from Top left to bottom right in Two Dimensional Array | 2014-08-13 14:43:45 |

Merge or Combine Two Sorted Linked Lists | 2014-08-12 14:58:31 |

Singly Linked List Implementation | 2014-08-12 14:34:27 |

Rearrange Positive and Negative Numbers of Array On Each Side in O(nlogn) | 2014-08-04 17:50:28 |

Find The Longest Sequence Of Prefix Shared By All The Words In A String | 2014-08-04 17:37:31 |

Print All Elements of Two Dimensional Array in Spiral | 2014-08-04 17:11:31 |

Find a pair of numbers from an array whose sum equals k | 2014-08-04 02:01:38 |

Check If String has All Unique Characters | 2014-08-03 05:49:14 |

Quick Sort Implementation | 2014-08-03 02:22:30 |

Find Whether Given Sequence of parentheses are well formed. | 2014-07-23 19:08:54 |

Find an Element in 2 dimensional sorted array | 2014-07-20 22:27:52 |

Find Whether Given String is palindrome or Not. | 2014-07-20 22:19:24 |

Find a peak element in a Given Array | 2014-07-20 22:12:23 |

Find two Missing Numbers in a Sequence of Consecutive Numbers | 2014-07-20 22:05:30 |

Find a Missing Number From a Sequence of Consecutive Numbers | 2014-07-20 22:00:05 |

Hash Table Implementation | 2014-07-20 21:54:06 |

Merge Sort – Updated – Most Efficient ways to Implement | 2014-07-20 21:41:14 |

Binary Search | 2014-07-20 15:35:10 |

## Recent Comments