## Balanced expression with replacement

Given a string that contains only the following => ‘{‘, ‘}’, ‘(‘, ‘)’, ‘[’, ‘]’. At some places there is ‘X’ in place of any… Read More »

- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Introduction to Data Structures | 10 most commonly used Data Structures
- Iterative Postorder traversal | Set 3
- InfyTQ 2019 : Find the position from where the parenthesis is not balanced
- Check if the two given stacks are same
- Design a stack which can give maximum frequency element
- Implementing Forward Iterator in BST
- Reverse the Sentence using Stack
- Delete all even elements from a stack
- Analyzing BufferOverflow with GDB
- Python | Stack using Doubly Linked List
- Find all unique pairs of maximum and second maximum elements over all sub-arrays in O(NlogN)
- Triplet with a given sum in BST | Set 2
- Nodes from given two BSTs with sum equal to X
- Convert ternary expression to Binary Tree using Stack
- Find the winner of the Game to Win by erasing any two consecutive similar alphabets
- Stack in Python

Given a string that contains only the following => ‘{‘, ‘}’, ‘(‘, ‘)’, ‘[’, ‘]’. At some places there is ‘X’ in place of any… Read More »

Given a bracket sequence or in other words a string S of length n, consisting of characters ‘(‘ and ‘)’. Find length of the maximum… Read More »

Given an array arr[] and a number k. The task is to delete k elements which are smaller than next element (i.e., we delete arr[i]… Read More »

Given a stack with push(), pop(), empty() operations, delete middle of it without using any additional data structure. Input : Stack[] = [1, 2, 3,… Read More »

Given an expression exp of length n consisting of some brackets. The task is to print the bracket numbers when the expression is being parsed.… Read More »

Telephonic Round-1 A number of bad URLs are given (number could be huge-millions of them). Now user enters a URL, you need to identify whether… Read More »

Infix : An expression is called the Infix expression if the operator appears in between the operands in the expression. Simply of the form (operand1… Read More »

Prefix : An expression is called the prefix expression if the operator appears in the expression before the operands. Simply of the form (operator operand1… Read More »

Postfix: An expression is called the postfix expression if the operator appears in the expression after the operands. Simply of the form (operand1 operand2 operator).… Read More »

Infix expression: The expression of the form a op b. When an operator is in-between every pair of operands. Postfix expression: The expression of the… Read More »

Given a binary tree. Modify it in such a way that after modification you can have a preorder traversal of it using only the right… Read More »

Given a string of balanced expression, find if it contains a redundant parenthesis or not. A set of parenthesis are redundant if same sub-expression is… Read More »

Given a singly linked list, rearrange the list so that even and odd nodes are alternate in the list. There are two possible forms of… Read More »

A simple python List can act as queue and stack as well. Queue mechanism is used widely and for many purposes in daily life. A… Read More »

Given a string str, we need to print reverse of individual words. Examples: Input : Hello World Output : olleH dlroW Input : Geeks for… Read More »