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

SDE - 1

Tata1mg
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Data Structures, Algorithms, DBMS, Oops, Low Level Design
Tip
Tip

Tip 1 : Should Focus on DSA or Competitive Programming from 2nd year , If you are doing CP from 2nd year then must start DSA (Leetcode) from mid of 5th Semester. Don't keep topic for the last moment , read everything as much as you can before interview.
Tip 2 : Add 2-3 good projects and be ready with the answer of Why / What / How did this project.
Tip 3 : Also parallely read Cs fundamentals , DBMS , Operating System, Computer Networking.

Application process
Where: Linkedin
Eligibility: Should be in Final year.
Resume Tip
Resume tip

Tip 1 : Add Good projects and also prepare with Why / What / How did your project.
Tip 2 : Make balanced resume , Add projects and also add some problem solving skills. So that your resume should not be Dev or DSA baised.

Interview rounds

01
Round
Medium
Face to Face
Duration60 Minutes
Interview date9 Nov 2021
Coding problem2

It was afternoon, Environment was good.
Interviewer was nice and well explained every problem.

1. Square Root Of An Integer

Easy
20m average time
80% success
0/40
Asked in companies
OraclePharmEasyShareChat

You are given an integer ‘A’. Your task is to find the greatest non-negative integer whose square is less than or equal to ‘A’.

Square of a number is the product of the number with itself. For e.g. square of 3 is 9.

Problem approach

Step 1: I solved with brute forces using for loop.
Step 2 : Interviewer asked me to optimise the solution.
Step 3: Then I cam up with log n solution.

Try solving now

2. Longest Substring Without Repeating Characters

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

Given a string input of length n, find the length of the longest substring without repeating characters i.e return a substring that does not have any repeating characters.

Substring is the continuous sub-part of the string formed by removing zero or more characters from both ends.

Problem approach

Step 1 : First we discussed the problem.
Step 2 : I came up with brute force approach in N square time.
Step 3 : Interviewer asked me to optimize.
Step 4 : Finally I solved using Sliding window in O (n) time.

Try solving now
02
Round
Easy
Face to Face
Duration40 minutes
Interview date15 Nov 2021
Coding problem1

It was Evening, Environment was good.

1. LCA - Lowest Common Ancestor

Hard
40m average time
70% success
0/120
Asked in companies
QualcommOYOAmazon

The lowest common ancestor (LCA) is a concept in graph theory and computer science.

Let ‘T’ be a rooted tree with ‘N’ nodes. The lowest common ancestor is defined between two nodes, ‘u’ and ‘v’, as the lowest node in ‘T’ that has both ‘u’ and ‘v’ as descendants (where we allow a node to be a descendant of itself). - Wikipedia

For the given tree, The LCA of nodes 5 and 8 will be node 2, as node 2 is the first node that lies in the path from node 5 to root node 1 and from node 8 to root node 1.

Path from node 5 to root node looks like 5 → 2 → 1.

Path from node 8 to root node looks like 8 → 6 → 2 → 1.

Since 2 is the first node that lies in both paths. Hence LCA will be 2.

Given any two nodes ‘u’ and ‘v’, find the LCA for the two nodes in the given Tree ‘T’.

Note: For each test case, the tree is rooted at node 1.

Problem approach

Step1 : I cam up with brute force solution.
Step2: Then optimize the solution as interviewer asked me to optimise the solution.

Try solving now
03
Round
Medium
Face to Face
Duration60 minutes
Interview date18 Nov 2021
Coding problem2

It was Evening, Interviewer joined bit late . Environment was good.

1. Maximum profit

Moderate
40m average time
75% success
0/80
Asked in companies
PharmEasyTata1mg

Ninja is a poor but an intelligent boy. He has a rod of length ‘N’ units. He wants to earn maximum money by selling this rod in the market. So he cuts the rod into different sizes and each size has a cost associated with it. Determine the maximum money he can earn by cutting the rod and selling its pieces.

Note:
1. The sizes will range from 1 to ‘N’ and will be integers.

2. The sum of the pieces cut should be equal to ‘N’.

3. Consider 1-based indexing.
Problem approach

Step1: I solved in O(n) time in first attempt.

Try solving now

2. Best Time to Buy and Sell Stock

Moderate
20m average time
80% success
0/80
Asked in companies
IntuitOptumOYO

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Problem approach

Step1: I explained by making graph in online paint.
Step2: Then I code it with optimal approc.

Try solving now
04
Round
Medium
Face to Face
Duration60 minutes
Interview date29 Nov 2021
Coding problem2

It was managerial round.
It was Evening. 
Environment was good.
We started with projects discussion.

1. Minimum Sum of Absolute Differences

Easy
10m average time
90% success
0/40
Asked in companies
PharmEasyAdobeOla

You have been given two arrays/lists 'ARR1' and 'ARR2' of length 'N'. Your task is to pair each element of 'ARR1' to an element of 'ARR2' such that the sum of the absolute difference of all pairs is minimum.

Example:
If 'ARR1' = [0, 2, 1], and 'ARR2' = [8, 10, 4] then the most optimal pairing will be (0, 4) , (1, 8) and (2, 10). The sum of absolute difference will be 4 + 7 + 8 = 19.
Note:
An element from one array can make a pair only with at most one element of another array.
Problem approach

Step1 : First I solved with brute force n square.
Step2 : Interviewer asked me to optimise the solution.
Step3 : I come with nlogn approch.

Try solving now

2. DBMS Question

Asked me to design the Database Schema of User and Order. 5 sql queries on situation based in the same design.

Problem approach

Tip 1 : Write all the queries with optimal approach.
 

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
4 rounds | 8 problems
Interviewed by Tata1mg
1268 views
1 comments
0 upvotes
SDE - 1
3 rounds | 5 problems
Interviewed by Tata1mg
1312 views
0 comments
0 upvotes
SDE - 1
1 rounds | 3 problems
Interviewed by Tata1mg
1636 views
1 comments
0 upvotes
SDE - 1
4 rounds | 12 problems
Interviewed by Tata1mg
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes