Sort Big List Dates Problem Statement
Mary is an enthusiastic party-goer who struggles with remembering event dates. Help Mary by sorting a given list of event dates in an ascending order.
Example:
Input:
dates = [ [13,6,2007] , [2,6,2001] , [10,8,2019] , [1,6,2007] ]
Output:
dates = [ [2,6,2001] , [1,6,2007] , [13,6,2007] , [10,8,2019] ]
Explanation:
The list of dates is sorted in ascending order based on year, then month, and finally day.
Constraints:
1 <= T <= 10
1 <= N <= 106
1 <= dates[i][0] <= 31
1 <= dates[i][1] <= 12
2000 <= dates[i][2] <= 2099
- Time limit: 1 second

AnswerBot
4mo
Sort a list of event dates in ascending order based on year, month, and day.
Sort the list of dates based on year, then month, and finally day.
Use a sorting algorithm to rearrange the dates in ascendin...read more
Help your peers!
Add answer anonymously...
Morgan Stanley Software Developer interview questions & answers
A Software Developer was asked 8mo agoQ. Given an integer array nums and an integer k, return the kth largest element in ...read more
A Software Developer was asked 9mo agoQ. Explain the concept of a HashMap.
A Software Developer was asked Q. Why do you want to work at Morgan Stanley?
Popular interview questions of Software Developer
A Software Developer was asked 5mo agoQ1. What is abstraction?
A Software Developer was asked 8mo agoQ2. Given an integer array nums and an integer k, return the kth largest element in ...read more
A Software Developer was asked 9mo agoQ3. Explain the concept of a HashMap.
>
Morgan Stanley Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

