Skip to content

Tag Archives: cpp-deque

The task is to implement a dynamic Deque using templates class and a circular array, having the following functionalities:   front(): Get the front item… 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 an array arr[], the task is to print the array obtained by inserting elements of arr[] one by one into an initially empty array,… Read More
Given a string str, the task is to find the substring of length K which occurs the maximum number of times. If more than one… Read More
Given a matrix arr[][] of dimensions N * M, having elements 0, 1, and 2. There is only one cell with value 1 present in… Read More
Given an array arr[] of integers and another integer D, the task is to perform D circular rotations on the array and print the modified… Read More
Deque in C++ Standard Template Library (STL) Double-ended queues are sequence containers with the feature of expansion and contraction on both the ends. They are similar… Read More
Deque or Double-ended queues are sequence containers with the feature of expansion and contraction on both the ends. They are similar to vectors, but are… Read More
deque::crbegin means constant_reverse_beginner and as the name suggests it returns a constant_reverse_iterator pointing to the last element of the deque. What is a constant iterator?… Read More
deque::get_allocator() is a built in function in C++ STL which is used to get allocator of container deque. Syntax: Allocator_type get_allocator() Parameters: This function does… Read More
The deque::crend() is an inbuilt function in C++ STL which returns a constant reverse iterator which points to the position before the first element of… Read More
The deque::shrink_to_fit() is a built-in function in C++ STL which reduces the capacity of the container to fit its size and destroys all elements beyond… Read More
Given a string S containing letters and ‘#‘. The ‘#” represents a backspace. The task is to print the new string without ‘#‘.Examples:   Input :… Read More
The cbegin() method in deque is a function in C++ STL which returns an iterator pointing to the first element of the container. Syntax: deque_name.cbegin()… Read More