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 పై మాత్రమే పనిచేస్తుంది.