Algorithm in C++

  • algorithm::adjacent_find(): Points the first occurrence of two identical consecutive numbers.
  • algorithm::all_of(): Returns true if the numbers lie under the range of first and last elements.
  • algorithm::binary_search(): Checks if the “value to be searched” is present in the sorted sequence or not.
  • algorithm::copy(): This function helps in copying a range of elements from one location to the new location.
  • algorithm::count_if(): This function returns the number of occurrences of particular elements if the condition mentioned in “if condition” is satisfied.
  • algorithm::equal(): This function tests whether two sets of elements are equal or not. There are a lot of similar functions predefined in C++ which can be sued by coders in the advantage of their business.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vishawjeetbhagat

Vishawjeetbhagat

9 Followers

A mechanical undergrad, writing is passion, what I feel I write.