## Find equilibrium index of an array

Given an array of integers, find equilibrium index in it.

Read More Find equilibrium index of an arrayCoding made easy

Given an array of integers, find equilibrium index in it.

Read More Find equilibrium index of an arrayGiven an array containing only 0’s, 1’s and 2’s, sort the array in linear time and using constant space.

Read More Sort an array containing 0’s, 1’s and 2’s (Dutch national flag problem)Given a Binary Tree, determine if it is a BST or not. This problem has a simple recursive solution. The BST property “every node on the right subtree has to be larger than the current node and every node on the left subtree has to be smaller than the current node” is the key …

Read More Determine if given Binary Tree is a BST or notGiven a binary tree, write an efficient algorithm to find maximum sum root to leaf path i.e. maximum sum path from root node to any leaf node in it.

Read More Find maximum sum root to leaf path in a binary treeGiven a binary tree, write iterative and recursive solution to traverse the tree using pre-order traversal. Unlike linked lists, one-dimensional arrays and other linear data structures, which are traversed in linear order, trees may be traversed in multiple ways in depth-first order (pre-order, pre-order and pre-order) or breadth-first order (level order traversal). Beyond these …

Read More Preorder Tree Traversal | Iterative & RecursiveGiven a binary tree, write an efficient algorithm to convert binary tree to its mirror.

Read More Convert binary tree to its mirrorGiven a binary tree, in-place convert it to its sum tree. In a sum tree, value at each node is equal to the sum of all elements present in its left and right subtree. The value of an empty node is considered as 0.

Read More In-place convert given binary tree to its sum treeGiven a binary tree, print its nodes level by level in reverse order. i.e. all nodes present at last level should be printed first followed by nodes of second-last level and so on.. All nodes for any level should be printed from left to right.

Read More Reverse Level Order Traversal of Binary TreeGiven a linked list, detect cycle in it.

Read More Detect Cycle in a linked list (Floyd’s Cycle Detection Algorithm)Given a linked list and a positive integer K, find K’th node from the end in a linked list.

Read More Find K’th node from the end in a linked listGiven a linked list, reverse every adjacent group of k nodes in it where k is given positive integer.

Read More Reverse every group of k nodes in given linked listGiven a singly list it, reverse it using recursion.

Read More Reverse linked list | Part 2 (Recursive Solution)Given a singly linked list it, reverse it.

Read More Reverse linked list | Part 1 (Iterative Solution)Given a linked list sorted in increasing order, write a function which removes any duplicate nodes from the list by traversing the list only once.

Read More Remove duplicates from a sorted linked list