Question: develop a function in C++ that is called Date ThirdLatest(std::vector & dates) {} and returns the third latest date. You are provided with an array


develop a function in C++ that is called Date ThirdLatest(std::vector
You are provided with an array of custom Date objects. A date has members Day, Month and Year of type integer, and is represented in input and output as "DD-MM-YYYY" Implement below function such that it returns the third-latest date, given such an array of Date objects. You may assume the input array will always have at least 3 distinct elements, and that the dates in the input are valid. Please don't use built-in date/time classes other than the one provided. Extra marks are given for an efficient implementation. Example: Input: [14-04-2001, 29-12-2061, 21-10-2019, 07-01-1973, 19-07-2014, 11-03-1992, 21-10-2019] Output: 19-07-2014
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
