The Ds\Deque::find() function is an inbuilt function in PHP which is used to find the index of the element in the Deque if element found in the Deque.
public Ds\Deque::find( $value ) : mixed
Parameters: This function accepts single parameter $value which holds the element whose index is to be found.
Return Value: This function returns the index of the element if element exist, else returns false.
Below programs illustrate the Ds\Deque::find() function in PHP:
Elements in the Deque Ds\Deque Object (  => 10  => 20  => 3  => 40  => 50  => 6 ) Index of 3 in the deque: 2
Elements in the Deque Ds\Deque Object (  => Geeks  => for  => GFG ) Index of 3 in the deque: bool(false)
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.