Learn C++ STL

Lesson 8 of 9 · sort, Comparators and Lambdas: Tell the Algorithm What You Mean

Module 12 · sort, Comparators and Lambdas: Tell the Algorithm What You Mean

Cheat Sheet: sort, Comparators and Lambdas on One Page

ProReading

This page is the module on one sheet, for the minute before a contest or an interview. Every line here was taught, measured or run in lessons 01 to 06. Nothing is new. Print it, or keep it open beside the editor.

Checking what this lesson needs for you…

What is inside Cheat Sheet: sort, Comparators and Lambdas on One Page

  1. The calls and their cost
  2. Four ways to write the rule
  3. The lambda on one card
  4. The three rules every comparator keeps
  5. The idioms
  6. Which tool, by lesson 04's flowchart
  7. GCC 12's numbers
  8. The traps

Module test

Ten questions on this module. Pass at 70%, and you can take it as many times as you like.

Take the module test