## Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time

Give an array arr[] of N integers and another integer k ≤ N. The task is to find the maximum element of every sub-array of… Read More »

- Implement a stack using singly linked list
- MakeMyTrip Interview Experience 2019
- Print the last k nodes of the linked list in reverse order
- Sum of minimum elements of all subarrays
- Clone a stack without extra space
- Program to reverse a linked list using Stack
- Infix to Postfix using different Precedence Values for In-Stack and Out-Stack
- Count all Grandparent-Parent-Child Triplets in a binary tree whose sum is greater than X
- Print the last k nodes of the linked list in reverse order | Iterative Approaches
- Difference between Stack and Queue Data Structures
- Construct a BST from given postorder traversal using Stack
- Sum of minimum elements of all possible sub-arrays of an array
- Solve the Logical Expression given by string
- Reduce the string by removing K consecutive identical characters
- Sum of bitwise AND of all submatrices
- Print Stack Elements from Bottom to Top
- Sum of maximum elements of all possible sub-arrays of an array
- Sum of Bitwise-OR of all Submatrices
- Check if the given push and pop sequences of Stack is valid or not
- Remove all continuous occurrences of 'a' and all occurrences of 'b'
- Find the product of last N nodes of the given Linked List
- Number of submatrices with OR value 1
- Check if moves in a stack or queue are possible or not
- Subroutine, Subroutine nesting and Stack memory
- Number of submatrices with all 1s
- Find maximum in stack in O(1) without using additional stack
- Print leaf nodes in binary tree from left to right using one stack
- Count the number of pop operations on stack to get each element of the array

Give an array arr[] of N integers and another integer k ≤ N. The task is to find the maximum element of every sub-array of… Read More »

The task is to design a stack which can get the maximum value in the stack in O(1) time without using an additional stack. Examples:… Read More »

Given a binary tree, the task is to print all leaf nodes of the given binary tree from left to right. That is, the nodes… Read More »

Given a linked list containing N nodes and a positive integer K where K should be less than or equal to N. The task is… Read More »

Given a NxN matrix, the task is to find the sum of bit-wise OR of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given a NxN matrix, the task is to find the sum of bit-wise AND of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given a N*N binary matrix, task is to find the count of rectangular sub-matrices with OR value 1. Examples: Input : arr[][] = {{0, 0,… Read More »

Given a N*N matrix containing only 0s and 1s, the task is to count the number of submatrices containing all 1s. Examples: Input : arr[][]… Read More »

Given a stack s, the task is to print the elements of the stack from bottom to top, such that the elements are still present… Read More »

Given a linked list. The task is to reverse the order of the elements of the Linked List using an auxiliary Stack. Examples: Input :… Read More »

Given an array arr[], the task is to find the sum of the minimum elements of every possible sub-array of the array. Examples: Input: arr[]… Read More »

Given an array arr[], the task is to find the sum of the maximum elements of every possible sub-array of the array. Examples: Input: arr[]… Read More »

Stack A stack is a linear data structure in which elements can be inserted and deleted only from one side of the list, called the… Read More »

Given a linked list containing N nodes and a positive integer k should be less than or equal to N. The task is to print… Read More »

I applied for SSE position (Gurgaon Location) There were three rounds.. First round: Data Structures And Problem solving https://www.geeksforgeeks.org/level-order-traversal-in-spiral-form/ https://www.geeksforgeeks.org/rotate-a-matrix-by-90-degree-in-clockwise-direction-without-using-any-extra-space/ https://www.geeksforgeeks.org/design-a-data-structure-that-supports-insert-delete-search-and-getrandom-in-constant-time/ Second Round: Problem solving/Project… Read More »