Skip to content

Tag Archives: deque

What is deque? In C++, a deque is a sequence container and it is also known by the name, double-ended queue. As the name implies,… Read More
What is a deque? In C++, the deque is a sequence container and it is also known by the name, double-ended queue. As the name… Read More
find() function finds the element in the given range of numbers. Returns an iterator to the first element in the range [first, last) that compares… Read More
Given two positive integers N and K, the task is to construct a permutation of the first N natural numbers such that all possible absolute… Read More
Given an array arr containing N unique integers. The task is to calculate the minimum number of deques required to make the array sorted. Example: … Read More
Given an array arr[] of N integers, the task is to find the lexicographically largest permutation by sequentially inserting the array elements to the front… Read More
Given a sorted array arr[] of the first N Natural Numbers and an integer X, the task is to print the last remaining element after… Read More
Given two sentences S1 and S2, the task is to check if the sentences can be made equal by inserting at most one sentence(possibly, empty)… Read More
Given an array arr[] consisting of N positive integers and a string S of length (N – 1), containing characters ‘+’ and ‘*’, the task… Read More
Given a string S consisting of N characters, the task is to find the length of all prefixes of the given string S that are… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to print the maximum sum possible in a subsequence satisfying… Read More
Queue: A Queue is a linear data structure that follows a First In First Out (FIFO) order in which the operations are performed. It is… Read More
Given integers N, L and R, the task is to generate a Bitonic Sequence of length N from the integers in the range [L, R]… Read More
Given a Linked List of even number of nodes, the task is to generate a new Linked List such that it contains the maximum difference… Read More
Given two positive integers N and K and an array F[] consisting of K positive integers. The Nth term of the recurrence relation is given… Read More

Start Your Coding Journey Now!