Practice ยท 1 of 1
Filter and rank with lambdas
Given the Student struct in the boilerplate, implement std::vector<Student> passing(const std::vector<Student>& students, int cutoff) returning students with score >= cutoff, ordered by score **descending**. Use std::copy_if with a capture-by-value lambda, then std::sort with a comparator lambda.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Lambda practice