# Tata Digital Health Interview Experience | (On Campus) September, 2019

In September 2019, **Tata Digital Health** Visited Our Campus, Following are the Details for the Same :

**Profile: Programmer **

**Cut-Off: 6.5**

**Note: The Test Was Conducted on Their Own Platform.**

**Brief Overview Of the Process: **

*Total 4 Rounds Were Conducted.*

* In Round-1, Around 150 Students Appeared, Out Of Which around 140 Students were Shortlisted for Round-2.*

*In Round-2, 15 Students were Shortlisted Out of 140 Students for Round-3.*

*Finally After Round-3 & 4, Total 5 Students were Selected, Unfortunately, I was not of them.*

**Round 1: Aptitude (10 Questions – 60 Minutes)**

The Questions Were Subjective i.e. You Have to Type the Answer. Questions were Easy to Moderate Level.

I Can Remember 5 Questions, Out of 10, Which, Along-with Answers, are as Follows :

**Q.1.)** The captain of a cricket team of 11 members is 26 years old and the wicket keeper is 3 years older. If the ages of these two are excluded, the average age of the remaining players is one year less than the average age of the whole team. Find out the average age of the team.

**Ans.1.)** 23

**Q.2.) **The present ratio of students to teachers at a certain school is 30 to 1. If the student enrollment were to increase by 50 students and the number of teachers were to increase by 5, the ratio of students to teachers would then be 25 to 1. What is the present number of teachers?

**Ans.2)** 15

**Q.3.) **In 1930, a correspondent proposed the following question: A man’s age at death was one twenty-ninth of the year of his birth. How old was the man in 1900?

**Ans.3)** 44

**Q.4.**) Richard is a strange liar. He lies on 6 days of the week, but on the seventh day he always tells the truth. He made the following statements on 3 successive days:

Day 1 : “I lie on Mon and Tue.”

Day 2 : “Today, it’s Thu, Sat, or Sun”

Day 3 : “I lie on Wed and Fri.”

On which day does Ravi tell the truth?

**Ans.4.)** Tuesday

**Q.5.) **In a class of students, if 1 is absent rest of people can be divided into 6 equal parts and if 2 are absent rest of them are divided into 7 equal parts, how many students are present in the class?

**Ans.5.)** 37

**Round 2: Coding (2 Questions – 75 Minutes)**

**Question 1: **

You were playing a game of treasures where the treasure boxes were kept in a row. Each treasure box has a label denotes the amount placed inside the treasure box. A lock is designed to lock multiple treasure boxes next to each other in a row. Each treasure box is locked with zero or more number of such locks.

Your task is to unlock only one lock where you could get the maximum treasure amount from the boxes. There could be treasure boxes without any locks as well. On finding the maximum treasure amount, you should consider the boxes without the locks as well.

**Input Format: **

The first line contains a single integer N, the number of treasure boxes.

The next line contains N space separated integers A[i], the amount in ith box.

The next line contains a single integer K, the number of locks.

The next K line contains two space separated integers S[i] and E[i], the start and end of ith lock in the row.

** Output Format:**

Print the maximum amount M., can be found on unlocking only one lock.

**Constraints:**

1 <= N, K <= 100

0 <= A[i] <=10^6

1 <= S[i] <= E[i] <= N

** Explanation:**

There are N = 5 treasure boxes with amounts A = [2, 5, 6, 1, 4] and K= 3 locks.

Lock1 is used to lock boxes starts from 2nd position to 3rd position.

Lock2 is used to lock boxes starts from 3rd position to 4th position.

Lock3 is used to lock boxes starts from 3rd position to 5th position.

So when the lock1 is unlocked. you can find maximum amount 7 (2 + 5).

**Sample Input:**

5

2 5 6 1 4

3

2 3

3 4

3 5

**Sample Output:**

7

**Question 2: (This Problem is Same as Standard DP Problem – Coin Change Problem)**

Link : https://www.geeksforgeeks.org/coin-change-dp-7/

Delivery of goods are dispatched from the storage of ABC delivery company. The storage has goods of K different weights. Delivery vehicle can occupy goods up-to W weights.

Your task is to find the number of ways to fill the vehicle with the goods in the storage. Vehicle is considered as filled only if it fills the capacity without any space.

**Input Format:**

First line consists of single integer K, different weights of goods.

Next line consists of K space-separated integers w[i], weight of ith good.

Next line consists of a single integer W, vehicle capacity of weights.

**Output Format:**

Print the number of ways to fill the vehicle for the given capacity of weights.

**Constraints:**

1 <= K <=20

1 <= w[i] <= 100

1 <= W <= 1000

**Explanation:**

There are 4 ways to fill the vehicle with weight = 4. using weights of goods w = [1, 2, 3].

{1, 1, 1, 1}

{1, 1, 2}

{1, 3}

{2, 2}

**Sample Input:**

3

1 2 3

4

**Sample Output:**

4

**Round 3 : Interview **

**Round 4 : HR **

**Finally, 5 Students Were Selected.**

## Please

Loginto comment...