Lesson 11 of 24
STL Algorithms: sort, reverse, findSTL Algorithms: sort, reverse and find
10 min 30 XP
<algorithm>-ல் தயாரான algorithms: sort, reverse, max_element, min_element, count, find, binary_search. <numeric>-ல் accumulate. ஒரு வரியில் பெரிய வேலை!
<algorithm> gives you ready-made sort, reverse, max_element, min_element, count, find and binary_search; <numeric> adds accumulate. One line, lots of work done.
Example: edit me and press Run
Press Run to see the result here.sort() சராசரியாக O(n log n). binary_search sorted vector-ல் மட்டுமே சரியாக வேலை செய்யும்.
sort() runs in O(n log n). binary_search only works on a sorted range.