Tag Archives: PHP-ds_vector

A Vector Data Structure is used to store the sequence of values in a contiguous memory buffer which grows and shrinks automatically. The vector data… Read More
The Ds\Vector::__construct() function is an inbuilt function in PHP which is used to creates a new instance. Syntax: public Ds\Vector::__construct( $values ) Parameters: This function… Read More
The Ds\Vector::reverse() function is an inbuilt function in PHP which is used to reverse the vector elements in-place. Syntax: void public Ds\Vector::reverse( void ) Parameters:… Read More
The Ds\Vector::allocate() function is an inbuilt function in PHP which is used to allocate enough memory for a required capacity. It provides the custom size… Read More
The Ds\Vector::reversed() function is an inbuilt function in PHP which is used to reverse the elements of vector after copying the elements of original vector… Read More
The Ds\Vector::remove() function is an inbuilt function in PHP which is used to reverse the elements of the vector in-place. For example, if the vector… Read More
The Ds\Vector::unshift() function is an inbuilt function in PHP which is used to adds elements to the front of vector. This function moves all the… Read More
The Ds\Vector::rotate() function is an inbuilt function in PHP which is used to rotate the array elements by a given number of rotation. Rotations also… Read More
The Ds\Vector::shift() function is an inbuilt function in PHP which is used to remove the first element from the vector and return it. Syntax: mixed… Read More
The Ds\Vector::reduce() function is an inbuilt function in PHP which reduce the vector to a single value by applying operations in the callback function. Syntax:… Read More
The Ds\Vector::sorted() function is an inbuilt function in PHP which is used to sort the elements of the vector by creating a copy of the… Read More
The Ds\Vector::remove() function is an inbuilt function in PHP which is used to remove the value from index and return it. Syntax: public Ds\Vector::remove( $index… Read More
The Ds\Vector::set() function is an inbuilt function in PHP which is used to set the value in the vector at the given index. Syntax: void… Read More
The Ds\Vector::slice() function is an inbuilt function in PHP which is used to return the sub-vector of the given vector. Syntax: Ds\Vector public Ds\Vector::slice( $index,… Read More
The Ds\Vector::sort() function is an inbuilt function in PHP which is used to sort the elements of vector in-place. This will arrange the vector elements… Read More