Job Roles: Backend SDE 2 and Backend SDE 3
Location: Bangalore
Apply Here: Niro Money careers
Online Assessment Details:
Being a developer, you should know to process a large number of records with scripts. You are given records of T customers of compnay. Each record has the following information in the following format:
<customer_name>,<customer_no>, <date_of_birth>,<record _processing_date>
Where:
Now the company wants to know the age of each customer to give them age specific offers. The age of the customer is calculated by counting the number of days between: <record_processing_date> and his <date_of_birth>
Given T such records, your task is to print the age (in number of days) of the customer for each record.
Input Format
Constraints
Output Format
Evaluation Parameters
Sample Input
2
Ram Kumar, 134, 20.5.1994, 20.4.2002
gopal, 24, 31.12.1995, 21.02.2017
Sample Output
2892
7723
Explanation
The difference between dates 20.4.2002 and 20.5.1994 is 2921 days. And the difference between dates 21.02.2017 and 31.12.1995 is 7723 days.
The main occupation of the citizens of Numberland is to perform tasks on numbers. One such important task is finding interesting number sequences. As per the Numberland Institute of Research, an interesting sequence is defined as a sequence of numbers that are consecutive, for example:
1 2 3 4 5 6
10 11 12 13
are interesting sequences. Mathematically an interesting sequence has the following generic property: ni+1 = ni+1
The task faced by the research is as follows: Given an ordered set of distinct numbers, extract the length of the largest interesting sequence that can be obtained by rearranging the set of numbers.
Help the research the institute in finding the longest interesting subsequences.
Input Format:
Constraints:
Evaluation Parameters
Sample Input
11
15 17 13 16 14 3 4 6 1 2 5
Sample Output
6
Here we can re-arrange the sequence as
13 14 15 16 17 1 2 3 4 5 6
Observe that there are two interesting sequences
1 2 3 4 5 6
and
13 14 15 16 17
Sequence 1 2 3 4 5 6 is maximal length therefore the answer is 6