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 ಮೇಲೆ ಮಾತ್ರ ಕೆಲಸ ಮಾಡುತ್ತದೆ.