## Check if two nodes are in same subtree of the root node

Given a Binary Tree with distinct nodes. Given two nodes node1 and node2, check if the two nodes lies in the same subtree of the… Read More »

- How can one become good at Data structures and Algorithms easily?
- How do Dynamic arrays work?
- Find the node with maximum value in a Binary Search Tree
- Remove last node of the linked list
- Iterative Method To Print Left View of a Binary Tree
- Sort the array of strings according to alphabetical order defined by another string
- Fibonacci Heap - Deletion, Extract min and Decrease key
- Zig-Zag traversal of a Binary Tree using Recursion
- Number of array elements derivable from D after performing certain operations
- Print all nodes between two given levels in Binary Tree
- Sum of nodes at maximum depth of a Binary Tree | Set 2
- Print all odd nodes of Binary Search Tree
- Number of subarrays have bitwise OR >= K
- Reverse zigzag Traversal of a Binary Tree
- Count all Grandparent-Parent-Child Triplets in a binary tree whose sum is greater than X
- Number of sub-strings which are anagram of any sub-string of another string
- A variation of Rat in a Maze : multiple steps or jumps allowed
- Difference between Stack and Queue Data Structures
- Sum and Product of minimum and maximum element of Binary Search Tree
- Minimum number of edges between two vertices of a graph using DFS
- Building Expression tree from Prefix Expression
- Print All Leaf Nodes of a Binary Tree from left to right | Set-2 ( Iterative Approach )
- Sum of minimum elements of all possible sub-arrays of an array
- Delete all odd or even positioned nodes from Circular Linked List
- Sum of all the elements in an array divisible by a given number K
- Sum and Product of the nodes of a Circular Singly Linked List which are divisible by K
- Find maximum among all right nodes in Binary Tree
- Finding the path from one vertex to rest using BFS
- Product of all nodes in a Binary Tree
- Multidimensional Collections in Java

Given a Binary Tree with distinct nodes. Given two nodes node1 and node2, check if the two nodes lies in the same subtree of the… Read More »

A double ended priority queue supports operations of both max heap (a max priority queue) and min heap (a min priority queue). The following operations… Read More »

Given a binary tree with distinct nodes and a pair of two nodes. The task is to find the XOR of all of the nodes… Read More »

Given an array of integers. The task is to find the Bitonicity of the given array. The Bitonicity of an array arr[] can be defined… Read More »

Given two arrays arr1[] and arr2[]. The task is to find the total number of distinct pairs(formed by picking 1 element from arr1 and one… Read More »

Given a Binary Node and a node. The task is to search and check if the given node exits in the binary tree or not.… Read More »

Given an integer and ranges (e.g. [a, b]) which are intersecting and overlapping. The task is to find all the number within the range that… Read More »

Given an unsorted array A[]. The task is to print all unique pairs in the unsorted array with equal sum. Note: Print the result in… Read More »

Given an integer and two arrays and , the task is to count the total pairs (formed after choosing an element from and another from… Read More »

Given a string of lowercase English alphabets. The task is to check if the count of distinct characters in the string is prime or not.… Read More »

Given a string . Find a string , where B is a palindrome and A is a subsequence of B. A subsequence of a string… Read More »

Given an array of integer elements, the task is to find the length of the largest sub-array of such that all the elements of the… Read More »

Given a string , the task is to check if the frequencies of all the characters of the string are prime or not. If all… Read More »

Given an array of size . Move two pointers, one from the left side and one from the right side of the array, a pointer… Read More »

Given a size as n, The task is to generate a random alphanumeric String of this size. Below are various ways to generate random alphanumeric… Read More »