Skip to content

Category Archives: Stack

Given an integer N, the task is to print all numbers up to N in Lexicographical order. Examples: Input: N = 20Output: 1 10 11… Read More
Stack is basically a restrictive array that uses LIFO Property. We use pop() and push() Operations to delete and insert elements into the stack respectively.… Read More
Stacks are a type of data structure that follows the LIFO(Last In First Out) working principle, where a new element is added at one end… Read More
Java Vector: Vectors are analogous to arrays in a way that both of them are used to store data, but unlike an array, vectors are… Read More
Given a string S consisting of only lowercase characters, the task is to find the lexicographically smallest string after removing exactly K characters from the… Read More
Given a binary string S and a string of non-zero digits P of length N, the task is to maximize the sum using the given… Read More
It is absolutely possible to develop a stack allocator that completely complies with C++11 and C++14. However, you must take into account some of the… Read More
Given an array nums[] of size N and a starting index K. In one move from index i we can move to any other index… Read More
Write a program to reverse a stack using recursion, without using any loop. Example:  Input: elements present in stack from top to bottom 1 2… Read More
Stack: It is a linear data structure that follows the LIFO( Last In First Out ) order for performing the operations.  BIOS: It provides a… Read More
Stack: A stack is a linear data structure in which elements are accessed with one end called the “top” of the stack. It follows the… Read More
Recursion: The function calling itself is called recursion.   Stack: A stack is a data structure in which elements are inserted and deleted only at… Read More
What is Stack? Stack is a linear data structure that follows a particular order in which the elements are inserted and deleted. A stack follows… Read More
What is stack space? A stack is an area of memory used to temporarily store information in a computer program. It is a common data… Read More
What is alloca() function? The function alloca() is used to allocate memory for a stack frame. It’s just an unconventional method of dynamically allocating memory.… Read More

Start Your Coding Journey Now!