Tata1mg interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

Tata1mg
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
For product-based companies, I mainly focused on DSA, system design, and computer fundamentals like OS, OOPS, and SOLID principles. Apart from that, I worked on some personal projects using a basic MERN tech stack.
Application story
I reached out to my connection on LinkedIn for a referral (he was my senior). After one week, I received a call from HR regarding my expectations, stipend, and any previous internship experience.
Why selected/rejected for the role?
I cleared all the rounds. When I asked HR, she confirmed that I was selected but had been kept in the pipeline.
Preparation
Duration: 3 months
Topics: Data Structures, OOPs, Java, JavaScript, OS
Tip
Tip

Tip 1: Focus on the basics first.
Tip 2: Practice by participating in coding contests for timed interviews.
Tip 3: Get hands-on experience with some personal projects.

Application process
Where: Linkedin
Eligibility: No criteria, (Stipend: 30k)
Resume Tip
Resume tip

Tip 1: Keep track of your ATS score.

Tip 2: Only mention the things that you truly know.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date11 Oct 2024
Coding problem2

The interviewer asked me a standard coding medium-level problem. He was very supportive.

1. Search In Rotated Sorted Array

Moderate
30m average time
65% success
0/80
Asked in companies
FreshworksExpedia GroupPayPal

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].

After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.

For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Note:

Can you solve each query in O(logN) ?
Problem approach

One needs to find the peak of the rotated array and then identify on which side the target lies. Apply binary search to that part.

Try solving now

2. DBMS

What are ACID properties? (Learn)

Problem approach

Tip 1: Should know transactions.
Tip 2: Should know the full form.
Tip 3: Should know what each term stands for.

02
Round
Hard
Video Call
Duration60 minutes
Interview date15 Oct 2024
Coding problem2

This round heavily focused on DSA, containing two coding questions: one medium and one hard.

1. LRU Cache

Moderate
0/80
Asked in companies
Info Edge India (Naukri.com)Expedia GroupOla
Design a data structure that satisfies the constraints of a Least Recently Used (LRU).
1. Get(int num): If the key exists, it will return the value of the key stored. Else, return -1.    
2. Put(int key, int value): If the key already exists, update the value of the key. Else add the key-value pair to the cache. If the number of keys is more than the capacity for this operation, delete the least recently key used. 
Example:
For the following input: 

4 2
2 1 4
1 1
1 4

We will initialize an empty LRU cache for the first operation with a maximum capacity of 2.
For the first operation, we need to add a key-value pair (1,4) to the cache.
For the second operation, we need to return the value stored for key 1, i.e., 4
For the third operation, we need to return -1, as we don't have any key 4 in the cache.

So, the final output will be: 
4  -1
Problem approach
  1. Use a LinkedHashMap, which maintains insertion order or access order.
  2. Use a HashMap for O(1) access.
  3. Handle capacity by evicting the LRU element.
Try solving now

2. Candies

Moderate
10m average time
90% success
0/80
Asked in companies
Goldman SachsOYOMorgan Stanley

Prateek is a kindergarten teacher. He wants to give some candies to the children in his class. All the children stand in a line and each of them has a grade according to his or her performance in the class. Prateek wants to give at least one candy to each child. If two children are standing adjacent to each other, then the one with the higher rating must get more candies than the other. Prateek wants to minimize the total number of candies he must buy.

Given an array 'STUDENTS' of size 'N' that contains the grades for each student, your task is to find what is the minimum number of candies Prateek must buy so that he can distribute them among his students according to the criteria given above.

Example :

Given students' ratings : [5, 8, 1, 5, 9, 4]. 
He gives the students candy in the following minimal amounts : [1, 2, 1, 2, 3, 1]. He must buy a minimum of 10 candies.

Note :

1. If two students having the same grade are standing next to each other, they may receive the same number of candies.
2. Every student must get at least a candy.
Problem approach
  • Make a left-to-right pass: if ratings[i] > ratings[i-1], set candies[i] = candies[i-1] + 1.
  • Make a right-to-left pass: if ratings[i] > ratings[i+1], set candies[i] = max(candies[i], candies[i+1] + 1).
  • Sum all the candies and return the total.
Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - Intern
3 rounds | 7 problems
Interviewed by Tata1mg
1250 views
0 comments
0 upvotes
SDE - 2
2 rounds | 3 problems
Interviewed by Tata1mg
1589 views
0 comments
0 upvotes
SDE - 1
2 rounds | 5 problems
Interviewed by Tata1mg
1273 views
0 comments
0 upvotes
SDE - 2
3 rounds | 4 problems
Interviewed by Tata1mg
2032 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15480 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15338 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes