Skip to content

Tag Archives: PHP-ds_deque

The Ds\Deque::contains() function is an inbuilt function in PHP which is used to check the deque contains given values or not. Syntax: bool Ds\Deque::contains( $values… Read More
A dequeue data structure is used to store the sequence of values in a contiguous memory buffer which grows and shrinks automatically. The dequeue is… Read More
The Ds\Deque::__construct() function is an inbuilt function in PHP which is used to create a new instance. Syntax: Ds\Deque::__construct( $values ) Parameters: This function accepts… Read More
The Ds\Deque::unshift() function is an inbuilt function in PHP which is used to add the value in front of the deque. Syntax: void Ds\Deque::unshift( $values… Read More
The Ds\Deque::shift() function is an inbuilt function in PHP which is used to remove and return the first value of deque. Syntax: mixed Ds\Deque::shift( void… Read More
The Ds\Deque::push() function is an inbuilt function in PHP which is used to add the elements to the Deque by appending an element at the… Read More
The Ds\Deque::sum() function is an inbuilt function in PHP which is used to return the sum of all elements present in the Deque. Syntax: public… Read More
The Ds\Deque::reversed() function is an inbuilt function in PHP which is used to return the copy of Deque which contains the elements in reversed order.… Read More
The Ds\Deque::rotate() function is an inbuilt function in PHP which is used to rotate the elements of Deque by the given number of rotations. Syntax:… Read More
The Ds\Deque::reverse() function is an inbuilt function in PHP which is used to reverse the elements in the Deque in-place. Syntax: public Ds\Deque::reverse( void )… Read More
The Ds\Deque::remove() function is an inbuilt function in PHP which is used to remove and return the index value. Syntax: public Ds\Deque::remove( $index ) :… Read More
The Ds\Deque::merge() function is an inbuilt function in PHP which is used to return the merged Deque after merging all the elements of one Deque… Read More
The Ds\Deque::pop() function is an inbuilt function in PHP which is used to remove the last element from Deque (if Deque is not empty) and… Read More
The Ds\Deque::sorted() function is an inbuilt function in PHP which is used to return a copy of Deque which contains the element in the original… Read More
The Ds\Deque::slice() function is an inbuilt function in PHP which is used to return a sub-Deque which contains elements of the Deque within the index… Read More