[CSI] Sort() function for Vectors

Mikhail Nesterenko mikhail at cs.kent.edu
Thu May 5 15:41:02 EDT 2022


> 
> Does the sort() function always sort elements in ascending order?
> 

This one sorts in descending order. Why? You have to wait till CS3 to
find out.

     sort(v.begin(), v.end(), std::greater<int>());


Thanks,
-- 
Mikhail


More information about the cs13001 mailing list