Problem Statement: Given an array of non-negative integers representation elevation of ground. Your task is to find the water that

Continue reading# Category: Data Structure

## Find the duplicate in an array of N+1 integers

Problem Statement: Given an array of N + 1 size, where each element is between 1 and N. Assuming there

Continue reading## Find K-th Permutation Sequence

Problem Statement: Given N and K, where N is the sequence of numbers from 1 to N([1,2,3….. N]) find the

Continue reading## Boundary Traversal of a Binary Tree

Problem Statement: BoundaryTraversal of a binary tree. Write a program for the Anti-Clockwise Boundary traversal of a binary tree. Example: Solution

Continue reading## Count Maximum Consecutive One’s in the array

Problem Statement: Given an array that contains only 1 and 0 return the count of maximum consecutive ones in the

Continue reading## Stock Buy And Sell

Problem Statement: You are given an array of prices where prices[i] is the price of a given stock on an

Continue reading## Area of largest rectangle in Histogram

Problem Statement: Given an array of integers heights representing the histogram’s bar height where the width of each bar is

Continue reading## Implement Queue using Stack

Problem Statement: Given a Stack having some elements stored in it. Can you implement aQueue using the given Stack? Queue:

Continue reading## Length of Longest Substring without any Repeating Character

Problem Statement: Given a String, find the length of longest substring without any repeating character. Examples: Example 1: Input: s

Continue reading## Morris Preorder Traversal of a Binary Tree

Problem Statement: Morris Preorder Traversal of a Binary tree. Given a Binary Tree, find the Morris preorder traversal of Binary

Continue reading