Problem Statement: Given the root of a binary tree, return the zigzag level order traversal of Binary Tree. (i.e., from

Continue reading## Aggressive Cows : Detailed Solution

Problem Statement: You are given an array ‘arr’ of size ‘n’ which denotes the position of stalls.You are also given

Continue reading## Next Greater Element Using Stack

Problem Statement: Given a circular integer array A, return the next greater element for every element in A. The next

Continue reading## Implement Min Stack : O(2N) and O(N) Space Complexity

Problem Statement: Implement Min Stack | O(2N) and O(N) Space Complexity. Design a stack that supports push, pop, top, and

Continue reading## Rotten Oranges : Min time to rot all oranges : BFS

Problem Statement: You will be given an m x n grid, where each cell has the following values : 2

Continue reading## Allocate Minimum Number of Pages

Problem Statement: Given an array ‘arr of integer numbers, ‘ar[i]’ represents the number of pages in the ‘i-th’ book. There

Continue reading## 3 Sum : Find triplets that add up to a zero

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

Continue reading## Implement Stack using single Queue

Problem Statement: Implement a Stack using a single Queue. Note: Stack is a data structure that follows the Last In

Continue reading## Serialize And Deserialize a Binary Tree

Problem Statement: Design an algorithm to serialize and deserialize a binary tree. There is no restriction on how your serialization/deserialization

Continue reading## Median of Two Sorted Arrays of different sizes

Problem Statement: Given two sorted arrays arr1 and arr2 of size m and n respectively, return the median of the

Continue reading