Lesson 11 of 24
STL Algorithms: sort, reverse और find
10 min 30 XP
<algorithm> आपको तैयार sort, reverse, max_element, min_element, count, find और binary_search देता है; <numeric> accumulate जोड़ता है। एक लाइन, ढेर सारा काम।
Example: edit me and press Run
Output Loading C++ (first time takes a few seconds)
Press Run to see the result here.sort() O(n log n) में चलता है। binary_search सिर्फ़ sorted range पर काम करता है।