Write an efficient recursive function that returns the position of @x@ in the subvector @v@[@left@..@right@]. The function must return if @x@ does not belong to @v@[@left@..@right@] or if @left@ @right@.
The vector @v@ is sorted in strictly increasing order. Moreover, we have @left@ size of v and @right@ size of v.
| C++ | |
| C | |
| Java | |
| Python | |
| MyPy | |
You only need to submit the required procedure; your main program will be ignored.