Tata 1mg interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Tata 1mg
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I started preparing for placement in my third year, and then I got this opportunity in my fourth year through on-campus placement. There were a total of 3-4 rounds. Unfortunately, I got rejected in the second round because I wasn't good enough in DSA at that time. First Round - Coding Test Second Round - Technical Interview Third Round - Technical Interview Fourth Round - HR Round
Application story
I started preparing for placements in the third year, and then I got this opportunity in the 4th year through On-Campus Placement. There were a total of 3-4 rounds. Unfortunately, I got rejected in the 2nd round because I wasn't good enough in DSA at that time.
Why selected/rejected for the role?
I got rejected in the 2nd round just because I wasn't good enough in DSA at that time, and there were a few topics in my projects that I couldn't answer.
Preparation
Duration: 3 months
Topics: Data Structures, Algorithms, OOPS, System Design, Dynamic Programming, DBMS, Computer Networks, Operating Systems
Tip
Tip

Tip 1: Practice at least 300 medium-to-hard coding questions.
Tip 2: Have thorough knowledge of your role in the project.
Tip 3: Prepare one system design question.

Application process
Where: Campus
Eligibility: 7 CGPA
Resume Tip
Resume tip

Tip 1: Include only your latest project on your resume.
Tip 2: Mention your extracurricular activities on your resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 minutes
Interview date9 Dec 2021
Coding problem3

It has 3 coding questions of medium-hard level, and the time limit was only 60 minutes.

1. Page Faults

Moderate
30m average time
70% success
0/80
Asked in companies
Expedia GroupTata 1mgMicrosoft

In computing, a page fault is an exception for the memory management unit (MMU) when a process accesses a memory page without proper preparations.


Page replacement algorithm is needed to decide which page needs to be replaced when the new page comes in. Whenever a new page is referred to and is not present in memory, the page fault occurs, and the Operating System replaces one of the existing pages with a newly needed page.


You have given a sequence of pages in an array ‘Pages’ of length ‘N’ and memory capacity ‘C’. You have to find the number of page faults using the Least Recently Used (LRU) Algorithm. Initially, memory doesn't contain any pages.


For example:
'N' = 7, 'C' = 4, pages = [1, 2, 1, 4, 2, 3, 5].

For the first four pages, memory allocated with four pages, {1, 2, 1, 4}, page fault = 3.

For fifth, page number 2 is required, which is already present, page fault = 3.

Then, page number 3 is required, replaces LRU 2, page fault = 4.

Then, page number 5 is required, replaces LRU 1, page fault = 5.

The total page fault is 5.
Try solving now

2. Min Jumps

Easy
15m average time
85% success
0/40
Asked in companies
American ExpressSamsung R&D InstituteIntuit

You live in a Ninja town which is in the form of a N * M grid. In this town, people travel from one place to another by jumping over the buildings which are present in each cell of the grid. It is Christmas eve, and Santa wants to give gifts and chocolates to the kids who live in the building which is present at the cell (N - 1, M - 1). Initially, Santa is present on cell (0, 0). Since Santa is in a hurry, help him find a path from starting point to the endpoint with the least amount of time.

The Santa may go only from one building to any of its adjacent buildings which is present either to the right or to the bottom or bottom right cell i.e. if the current position is (x, y), he may go to (x + 1, y + 1) or (x + 1, y) or (x, y + 1) given that the new coordinates are in the grid. The time taken to reach from one building to another is equal to the absolute difference between the heights of buildings.

Note:

1. The heights of the buildings are positive.
2. Santa starts from the cell (0, 0) and he has to reach the building (N - 1, M - 1).
3. Santa cannot leave the grid at any point of time.
Try solving now

3. Towers

Moderate
15m average time
85% success
0/80
Asked in companies
Tata 1mgOracleHCL Technologies

You are given ‘N’ cubes in an array ‘ARR’ in a certain order, and your task is to build towers using them. Whenever two cubes are on top of the other, the upper cube must be smaller than the lower cube.

You must process the cubes in the given order. You can always either place the cube on top of an existing tower or begin a new tower. What is the minimum possible number of towers?

For example:

Given ‘N’ = 3, ‘ARR’[] = 3, 2, 1.
The answer will be one because you can stack one over two over 3. Therefore only these can be inserted in the same tower.
Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date14 Dec 2021
Coding problem2

Started off with an introduction, then the interviewer gave me a data structure problem.

1. Largest rectangle in a histogram

Hard
25m average time
75% success
0/120
Asked in companies
FacebookAppleAmazon

You have been given an array/list 'HEIGHTS' of length ‘N. 'HEIGHTS' represents the histogram and each element of 'HEIGHTS' represents the height of the histogram bar. Consider that the width of each histogram is 1.

You are supposed to return the area of the largest rectangle possible in the given histogram.

For example :
In the below histogram where array/list elements are {2, 1, 5, 6, 2, 3}.

alt text

The area of largest rectangle possible in the given histogram is 10.
Try solving now

2. Merge Sort

Easy
15m average time
85% success
0/40
Asked in companies
Wells FargoThought WorksAccenture

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm -

Merge sort is a Divide and Conquer based Algorithm. It divides the input array into two-parts, until the size of the input array is not ‘1’. In the return part, it will merge two sorted arrays a return a whole merged sorted array.

subsequence

The above illustrates shows how merge sort works.
Note :
It is compulsory to use the ‘Merge Sort’ algorithm.
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

To make an AI less repetitive in a long paragraph, you should increase:

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Tata 1mg
1260 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Tata 1mg
1306 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by Tata 1mg
1626 views
1 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Tata 1mg
1074 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114453 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57719 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34914 views
7 comments
0 upvotes