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

SDE - 1

Mercer Mettl
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I was admitted to DTU college in the computer science stream. I was advised by my seniors to practice DSA from the very start of B.Tech, and I did not take that seriously. Honestly speaking, I regretted not taking their advice and in the third year I started coding, and I had to increase practice hours because I started late.
Application story
I applied for the post through the campus drive. After applying I practiced hard for it and the hardwork paid off at the last.
Why selected/rejected for the role?
I think I was on point with my coding solutions to the questions asked in the interviews. I did not able to provide the optimal solutions, and I was giving correct explanations to some theory questions asked.
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Even if you are stuck in the problem, just give a try. The interviewer will help you definitely for sure.
Tip 2 : Prepare Data Structures and Algorithms well. They mostly check our Problem Solving ability to find the solutions for the real world problems.
Tip 3 : Be enough confident, don't be nervous. Maintain atleast 2 projects in your resume

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

Tip 1 : Mention atleast 2 projects.
Tip 2 : Mention your skills in which you are perfect.
Tip 3 : It should not be too long or too short

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date13 Jan 2023
Coding problem2

1. Rotting Oranges

Moderate
20m average time
78% success
0/80
Asked in companies
IBMSliceSamsung R&D Institute

You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:

  • Value 0 - representing an empty cell.
  • Value 1 - representing a fresh orange.
  • Value 2 - representing a rotten orange.
  • Every second, any fresh orange that is adjacent(4-directionally) to a rotten orange becomes rotten.

    Your task is to find out the minimum time after which no cell has a fresh orange. If it's impossible to rot all the fresh oranges then print -1.

    Note:
    1. The grid has 0-based indexing.
    2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
    
    Problem approach

    Use BFS

    Try solving now

    2. Technical Question

    Let's assume there are two functions one whose complexity was (N + M) and the other whose complexity was N*logM we need to tell which has lower complexity and also in what scenarios the function having lower complexity will take more time.

    Problem approach

    Tip 1 : Need to have a good knowledge of Asymptotic notations and time complexity.

    02
    Round
    Easy
    Video Call
    Duration60 minutes
    Interview date13 Jan 2023
    Coding problem2

    1. Contain Virus

    Hard
    45m average time
    55% success
    0/120
    Asked in companies
    AppleMeeshoMercer Mettl

    You have been given a 2D model of a country, with the help of a matrix containing 0 and 1. The 0’s in the model represent uninfected cells and 1’s represent the cells contaminated by a deadly spreading virus. Only a single wall can be built between any two cells of the model that are adjacent in all four directions, on their shared boundary.

    With every passing night, the virus spreads to all the adjacent cells, unless the cells are blocked by a wall. You need to build walls in order to stop the virus from spreading in the whole country. Note that you can only install walls around only one region which is the affected area that threatens to infect the most uninfected cells of the matrix in one day.

    Given the state of each cell, your task is to find the number of walls you used to stop as many cells as possible from being infected.

    Problem approach

    Solved using DFS

    Try solving now

    2. Shortest Path in a Binary Matrix

    Moderate
    37m average time
    65% success
    0/80
    Asked in companies
    SamsungOracleAmazon

    You have been given a binary matrix of size 'N' * 'M' where each element is either 0 or 1. You are also given a source and a destination cell, both of them lie within the matrix.

    Your task is to find the length of the shortest path from the source cell to the destination cell only consisting of 1s. If there is no path from source to destination cell, return -1.

    Note:
    1. Coordinates of the cells are given in 0-based indexing.
    2. You can move in 4 directions (Up, Down, Left, Right) from a cell.
    3. The length of the path is the number of 1s lying in the path.
    4. The source cell is always filled with 1.
    
    For example -
    1 0 1
    1 1 1
    1 1 1
    For the given binary matrix and source cell(0,0) and destination cell(0,2). Few valid paths consisting of only 1s are
    
    X 0 X     X 0 X 
    X X X     X 1 X 
    1 1 1     X X X 
    The length of the shortest path is 5.
    
    Try solving now
    03
    Round
    Easy
    Video Call
    Duration60 minutes
    Interview date13 Jan 2023
    Coding problem2

    1. Longest Common Subsequence

    Moderate
    39m average time
    0/80
    Asked in companies
    SlicePayPalSAP Labs

    Given two strings, 'S' and 'T' with lengths 'M' and 'N', find the length of the 'Longest Common Subsequence'.

    For a string 'str'(per se) of length K, the subsequences are the strings containing characters in the same relative order as they are present in 'str,' but not necessarily contiguous. Subsequences contain all the strings of length varying from 0 to K.

    Example :
    Subsequences of string "abc" are:  ""(empty string), a, b, c, ab, bc, ac, abc.
    
    Problem approach

    I started solving this problem with a brute force recursion approach.
    Step 1 : When either of the strings were empty, the LCS is 0.
    Step 2 : Else, if the current character of the strings matched, I checked for the previous prefix of the whole string, and added 1 to the answer.
    Step 3 : If the characters didn’t match, I took the maximum of LCS(string1_length - 1, string2_length) and LCS(string1_length, string2_length - 1).

    Try solving now

    2. Minimum Jumps

    Moderate
    25m average time
    75% success
    0/80
    Asked in companies
    WalmartDirectiMakeMyTrip

    Bob lives with his wife in a city named Berland. Bob is a good husband, so he goes out with his wife every Friday to ‘Arcade’ mall.

    ‘Arcade’ is a very famous mall in Berland. It has a very unique transportation method between shops. Since the shops in the mall are laying in a straight line, you can jump on a very advanced trampoline from the shop i, and land in any shop between (i) to (i + Arr[i]), where Arr[i] is a constant given for each shop.

    There are N shops in the mall, numbered from 0 to N-1. Bob's wife starts her shopping journey from shop 0 and ends it in shop N-1. As the mall is very crowded on Fridays, unfortunately, Bob gets lost from his wife. So he wants to know, what is the minimum number of trampoline jumps from shop 0 he has to make in order to reach shop N-1 and see his wife again. If it is impossible to reach the last shop, return -1.

    Problem approach

    The solution is quite simple if the height of wall is less than or equal to x, only one jump in that wall is required else we can calculate it by height of wall-(climb up-climb down) and get the jumps required.

    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 - 1
    3 rounds | 6 problems
    Interviewed by Mercer Mettl
    852 views
    0 comments
    0 upvotes
    SDE - 1
    2 rounds | 4 problems
    Interviewed by Mercer Mettl
    1199 views
    0 comments
    0 upvotes
    SDE - 1
    2 rounds | 4 problems
    Interviewed by Mercer Mettl
    1170 views
    0 comments
    0 upvotes
    SDE - 1
    3 rounds | 5 problems
    Interviewed by Mercer Mettl
    1165 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