fixing examples of the algorithms considering the change in apiv2 vs apiv1
This merge request mostly fixes in the examples of python and C++ mentioned in the algorithm section of documentation.
Edited by Zohreh MOSTAANI
This merge request mostly fixes in the examples of python and C++ mentioned in the algorithm section of documentation.