Categories of Questions

## Array Questions Alation

**Remove Minimum Number of Elements Such That no Common Element Exist in both Array** Given two arrays A and B consisting of n and m elements respectively. Remove minimum number of elements such that no common element exist in both array and print the count of elements which removed. Example Input: A[]={ 1, 2, 1, 1} B[]= {1, 1} Output: Minimum elements to remove ...

**Addition of Two Matrices** Problem Statement In the “Addition of Two Matrices” problem, we have given two matrices a and b. We have to find the final matrix after adding matrix b in matrix a. If the order is the same for both the matrices then only we can add them otherwise we can’t. ...

## String Questions Alation

**Longest Substring Without Repeating Characters** Given a string, we have to find the length of the longest substring without repeating characters. Let’s look into a few examples: Example pwwkew 3 Explanation: Answer is “wke” with length 3 aav 2 Explanation: Answer is “av” with length 2 Approach-1 for Longest Substring Without Repeating Characters Brute Force ...

## Tree Questions Alation

**Check whether a given Binary Tree is Complete or not** Problem Statement The problem “Check whether a given Binary Tree is Complete or not” states that you are given the root of a binary tree, check whether the tree is complete or not. A complete Binary Tree has all its levels filled except for the last level and the nodes ...

**Count the number of nodes at given level in a tree using BFS** Description The problem “Count the number of nodes at given level in a tree using BFS” states that you are given a Tree (acyclic graph) and a root node, find out number of nodes at L-th level. Acyclic Graph: It is a network of nodes connected through edges which has ...

## Graph Questions Alation

**Count the number of nodes at given level in a tree using BFS** Description The problem “Count the number of nodes at given level in a tree using BFS” states that you are given a Tree (acyclic graph) and a root node, find out number of nodes at L-th level. Acyclic Graph: It is a network of nodes connected through edges which has ...

## Queue Questions Alation

**Implementation of Deque using Doubly Linked List** Problem Statement The problem “Implementation of Deque using Doubly Linked List” states that you need to implement the following functions of Deque or Doubly Ended Queue using a doubly linked list, insertFront(x) : Add element x at the starting of Deque insertEnd(x) : Add element x at the end of ...

**Check whether a given Binary Tree is Complete or not** Problem Statement The problem “Check whether a given Binary Tree is Complete or not” states that you are given the root of a binary tree, check whether the tree is complete or not. A complete Binary Tree has all its levels filled except for the last level and the nodes ...

**Smallest Multiple of a Given Number** In the smallest multiple of a given number made of digits 0 and 9 only problem we have given a number n, find the smallest number made from digits 0 and 9 that is divisible by n. Assume that the answer will not exceed 106. Examples Input 3 Output 9 ...

## Matrix Questions Alation

**Addition of Two Matrices** Problem Statement In the “Addition of Two Matrices” problem, we have given two matrices a and b. We have to find the final matrix after adding matrix b in matrix a. If the order is the same for both the matrices then only we can add them otherwise we can’t. ...