Given a date, the task is to check if it is valid or not. It may be assumed that the given date is in range from 01/01/1800 to 31/12/9999 and any date not within this range will also be considered invalid.
d = 10, m = 12, y = 2000
Output:1Explanation:The given date 10/12/2000 is valid.
d = 30, m = 2, y = 1700Output:0Explanation:The given date 30/2/1700 is invalid.
You don't need to read input or print anything. Your task is to complete the function isValidDate() which takes 3 Integers d,m and y as input and returns the answer.
Expected Time Complexity: O(1) Expected Auxiliary Space: O(1)