Learn C++ STL

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

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

Problems: sort, Comparators and Lambdas

Free with an accountProblems

Ten problems, graded against hidden tests. Each one practises an idea from a lesson of this module, from lesson 01's notice board to lesson 06's print shop. Problems 1, 2 and 5 are free. The other seven open with Learn Pro or with the track.

Checking what this lesson needs for you…

What is inside Problems: sort, Comparators and Lambdas

  1. Every starter has the same shape
  2. Every tie needs a rule
  3. A rule must never be true both ways
  4. Work the key out once, before the sort
  5. The first idea, at the largest input
  6. When the order itself is the puzzle