Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please excute in C++. The format input format is: (the first line is the size of the array) You are provided with an array of
Please excute in C++. The format input format is: (the first line is the size of the array)
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-2014Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started