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

SDE - 2

Tata1mg
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I mainly focused on my problem-solving and DSA. I practiced a lot of LLD questions and also worked on my HLD concepts. You can get referrals from LinkedIn or apply on hiring sites like Naukri or Instahyre.
Application story
I received a call from HR; she saw my active profile on Naukri. After every round, she called me and asked when I am available for the next round. At the end, we negotiated for salary.
Why selected/rejected for the role?
Because in all the rounds, I was able to answer all the questions. In the first round, there were two questions that I was able to write the code for and explain my logic to the interviewer. This was followed by two more rounds based on LLD and HLD, for which I was able to provide all the requirements and also answer the follow-up questions.
Preparation
Duration: 4 months
Topics: Data structures and algorithm, OOPS, Low level design, High level design, language specific knowledge(Java), SQL queries.
Tip
Tip

Tip 1 : Practice DSA, it's very important for getting job.
Tip 2 : If you are preparing for sde2 , please study system design as well.
Tip 3 : You would expected to be really good in LLD, and fine in HLD as that comes at SD3 level mainly.

Application process
Where: Naukri
Eligibility: Based on your CV, if they like it.
Resume Tip
Resume tip

Tip 1: Mention your office work projects at the top.

Tip 2: List your skills after your projects.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date19 Jan 2024
Coding problem2

To check you Problem solving through DSA questions.

1. Find longest common prefix

Moderate
40m average time
60% success
0/80
Asked in companies
AdobeGrofersDunzo

You are given an array ‘ARR’ consisting of ‘N’ strings. Your task is to find the longest common prefix among all these strings. If there is no common prefix, you have to return an empty string.

A prefix of a string can be defined as a substring obtained after removing some or all characters from the end of the string.

For Example:
Consider ARR = [“coding”, ”codezen”, ”codingninja”, ”coders”]
The longest common prefix among all the given strings is “cod” as it is present as a prefix in all strings. Hence, the answer is “cod”.
Problem approach

First I took 2 minutes to go through the question and sample cases. After that I told my approach that I will consider first string as LCP and then go to all the strings and check how much prefix matches with it. The time complexity for this one is O(n*m) where n is the size of array of strings and m is the length of the longest string in array. He asked to optimise the time complexity. I tried to reduced the number of comparison while comparing the strings.So I wrote the code for this time complexity only.
Later on checked the solution for reduced time complexity so it could be done using binary search, do check that.

Try solving now

2. 3 sum

Moderate
15m average time
85% success
0/80
Asked in companies
IntuitSamsungGrofers

You are given an array/list ARR consisting of N integers. Your task is to find all the distinct triplets present in the array which adds up to a given number K.

An array is said to have a triplet {ARR[i], ARR[j], ARR[k]} with sum = 'K' if there exists three indices i, j and k such that i!=j, j!=k and i!=j and ARR[i] + ARR[j] + ARR[k] = 'K'.

Note:
1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Problem approach

Its a very popular problem. So initially I told the brute force solution that can be done in O(n^3) time complexity by having 3 nested loop and check all the possible combinations of triplets. Then I told the optimised approach where I first sort the array then have left and right pointer and check the sum for that triplet so here time complexity reduces to ~ O( n^2 log n).

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date25 Jan 2024
Coding problem1

The motive of this round was to judge a candidate based on his system design skills that includes Low level design(how you going to decide on the design patterns and solid principles) and High level design as well ( where they expect you to identify what kind of technologies you are going to choose like the database, cache, etc )

1. System Design

Design Parking Lot System.

Problem approach

Tip 1: After getting the question you can ask if requirements will be provided or you have to identify them. So that is the first part to start with.These Requirements involve : Actors, Model, Action.
Tip 2:Then one by one you can tell what all Classes you are going to create for these requirements in your code. Also explain what all design patterns you are going to use.
Tip 3: You can also include some unique features that are there in these big start-ups like Paytm. e.g. you could provide exciting offers to recurring users.
Tip 4: If interviewer ask you to build the data model you can do that or make it yourself; for that make sure you have good knowledge of DBMS like How we can reduce redundancy?
Tip 5: Which type of database you are going to use? Give reasons for that as well depending on your use case.
Tip 6: Include around 2-3 design patterns in your code.

03
Round
Medium
Video Call
Duration60 minutes
Interview date2 Feb 2024
Coding problem1

The motive of this round was majorly focussed around High level design. It was Tech + Managerial round where the interviewer brief about the company as well.Round was in evening around 5 pm. He was a really good interviewer.Very open environment to clear all your doubts about the company.

1. System Design

Design HLD for Short url.

Problem approach

Tip 1: You start by asking for requirements, what all features will be there.List your functional and non functional requirements like it should be high available and low latency.
Tip 2: Here you are expected to find QPS, memory and CPU requirements.Will it be write heavy or read heavy ask that based on that find these metrics.
Tip 3: For this particular problem, which hash will you be using and what will be the length of the shorten url.
Tip 3: How you are going to integrate CAP theorem here. Interviewer can ask you to explain CAP theorem as well.
Tip 4: At the end draw the HLD for it including database, cache, kafka, load balancer whatever should be there according to you.

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 - 1
3 rounds | 4 problems
Interviewed by Tata1mg
1233 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 - Intern
2 rounds | 4 problems
Interviewed by Tata1mg
52 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29569 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by HashedIn
9583 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6677 views
1 comments
0 upvotes