Concepts Used Back Tracking Difficulty Level Medium Problem Statement : Given N integers print all the distinct power sets of the sequence in lexicographical order. See original problem statement here...
Concepts Used Back Tracking Difficulty Level Easy Problem Statement : Given a string, we have to find total number of different sequences that can be formed using the letters in...
Concepts Used Backtracking Difficulty Level Easy Problem Statement : Given a string containing numeric digits from 2 to 9 inclusive, return all possible letter combinations that the number could represent...
Concepts Used Back Tracking Difficulty Level Hard Problem Statement : Given N integers print all distinct combinations. See original problem statement here Solution Approach : Introduction : Idea is to...
Concepts Used Back Tracking Difficulty Level Hard Problem Statement : Given a non-negative integer n representing the total number of bits , we need to print the sequence of gray...
Concepts Used Back Tracking Difficulty Level Easy Problem Statement : Given n set bits, we have to determine all the time that can be represented by those number of set...
Concepts Used Back Tracking Difficulty Level Hard Problem Statement : Given a matrix of characters with n rows and m columns, and few words. We have to find out if...
Concepts Used Back Tracking Difficulty Level Medium Problem Statement : Given N integers print all possible combinations. See original problem statement here Solution Approach : Introduction : Idea is to...
Given an undirected graph and M colors, the problem is to find if it is possible to color the graph with at most M colors or not. See original problem...
Concepts Used Back Tracking Difficulty Level Medium Problem Statement : Given N, count all the numbers with unique digits less than 10n. See original problem statement here Solution Approach :...
Concepts Used DFS , Recursion Difficulty Level Hard Problem Statement : "A SumTree is a Binary Tree where the value of a node is equal to sum of the nodes...
In this article, we will discuss different approaches to reorder linked list. Reordering a linked list will always clear the topic like a linked list. And Having knowledge about linked...
This blog will explain how to find pairs with given sum in linked list. Firstly, bruteforce is discussed which helps to figure the quickest solution and the optimized solution is...
Concepts Used Qucik sort. Difficulty Level Hard. Problem Statement : You are given a pointer to the head of a linked list. Now the length of the linked list is...
In this blog, we will discuss three different approaches to merge k sorted lists. Merging k sorted linked lists is a challenging topic and conquering it will make your data...
In the Below article, we are trying to delete smaller nodes in linked list and delete larger nodes in linked list. We have seen so many concepts in data structures...
In this blog, we have to figure out a palindrome linked list. A Palindrome linked list means a Linked List which has values in a palindromic form i.e. values from...
Concepts Used Linked list Difficulty Level Easy Problem Statement : You are given a sorted linked list and you have to insert a node in the list in a sorted...
Concepts Used DFS , Recursion Difficulty Level Medium Problem Statement : Given a binary tree, determine if it is a valid binary search tree (BST). See original problem statement here...
Concepts Used DFS , Recursion Difficulty Level Medium Problem Statement : Given a binary tree and the task is to convert that tree into SumTree. See original problem statement here...
Concepts Used BFS , Recursion Difficulty Level Easy Problem Statement : Given a binary tree, our task is to print the size of the tree. Size of tree represented as...
Concepts Used DFS , Recursion Difficulty Level Medium Problem Statement : Given two binary trees, we need to find whether one tree in the pair is the mirror image of...
Concepts Used DFS , Recursion Difficulty Level Hard Problem Statement : Given a binary tree, find the path length having maximum number of bends. See original problem statement here Solution...
Concepts Used BFS , Queue Difficulty Level Easy Problem Statement : Given a binary tree, our task is to print the level order traversal of the tree. See original problem...
Concepts Used DFS , Recursion Difficulty Level Medium Problem Statement : "Lowest common ancestor of two node n1 and n2 is the lowest node in the tree that has both...
Concepts Used DFS , Recursion, Stack Difficulty Level Easy Problem Statement : Given a binary tree, our task is to print the inorder traversal of the tree. See original problem...
Concepts Used BFS , Recursion Difficulty Level Easy Problem Statement : Given a binary tree, our task is to print the height of the tree. Consider root node height as...
Concepts Used DFS , Recursion, Hashing Difficulty Level Hard Problem Statement : Given a binary tree, our task is to return the maximum count of distinct integers present in a...
Concepts Used DFS , Recursion, Stack Difficulty Level Medium Problem Statement : Given a Binary Tree, convert it into its mirror. See original problem statement here Solution Approach : Introduction:...
CONCEPTS USED: Sorting DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given an array A containing N bulbs placed on the road of length L, these bulbs can be placed at any point...