← All topics
Quiz: STL Algorithms: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does this print? (code)
- Q2. What must you do before calling unique to remove all duplicates?
- Q3. What does this print? (code)
- Q4. Which sorts a vector v in DESCENDING order?
- Q5. Why use ios::syncwithstdio(false) in contests?
- Q6. What does this print? (code)
- Q7. What does this print? (code)
- Q8. What does binarysearch require of the range it searches?
- Q9. What is the time complexity of sort on n elements?
- Q10. Why is accumulate(v.begin(), v.end(), 0) risky for a vector of large long long values?