Problem statement: Given a binary search tree find the kth largest and smallest element in Binary Search Tree. Examples: Input:

Continue reading# Category: Data Structure

## Count the number of subarrays with given xor K

Problem Statement: Given an array of integers A and an integer B. Find the total number of subarrays having bitwise

Continue reading## Check for Symmetrical Binary Tree

Problem Statement: Check for Symmetrical Binary Trees Write a program to check whether a binary tree is symmetrical or not.

Continue reading## Morris Inorder Traversal of a Binary tree

Problem Statement: Write a program for Morris Inorder Traversal of a Binary Tree. Example: Input: Output: Inorder Traversal of this

Continue reading## Search Single Element in a sorted array

Problem Statement: Given a sorted array of N integers, where every element except one appears exactly twice and one element

Continue reading## Check for Balanced Parentheses

Problem Statement: Check Balanced Parentheses. Given string str containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, check

Continue reading## Majority Elements(>N/3 times) | Find the elements that appears more than N/3 times in the array

Problem Statement: Given an array of N integers. Find the elements that appear more than N/3 times in the array.

Continue reading## Grid Unique Paths | Count paths from left-top to the right bottom of a matrix

Problem Statement: Given a matrix m X n, count paths from left-top to the right bottom of a matrix with

Continue reading## 4 Sum | Find Quads that add up to a target value

Problem Statement: Given an array of N integers, your task is to find unique quads that add up to give

Continue reading## Count inversions in an array

Problem Statement: Given an array of N integers, count the inversion of the array (using merge-sort). What is an inversion

Continue reading