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

Software Developer

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

Interview preparation journey

expand-icon
Journey
I started my coding journey on YouTube, where I first learned the data structure and Algorithm. Then, I started my preparation of Data Structure on LinkedIn.
Application story
Company visited to your campus for the placement .
Why selected/rejected for the role?
I was rejected because I could not answer all the questions correctly during the given time of the interview.
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 - Practice Atleast 250 Questions
Tip 2 - Do atleast 2 projects

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

Tip 1 : Have some projects on resume.
Tip 2: Do not put false things on resume.

Interview rounds

01
Round
Easy
Face to Face
Duration60 mins
Interview date20 Jan 2023
Coding problem2

1. Unequal Adjacent Elements

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

You have been given an array/list ‘ARR’ of integers consisting of ‘N' integers. You need to rearrange ‘ARR’ so that no two adjacent elements are equal. You may return any valid rearrangement and it is guaranteed the answer exists.

Example :
Let’s say you have an array/list ‘ARR = [1,1,2,2]’. 

Then a valid rearrangement can be [1,2,1,2] or [2,1,2,1] such that no two adjacent elements are equal. [2,1,1,2] is an invalid arrangement because two adjacent elements are equal.
Problem approach

s1- The first test case

s2- The given array already satisfies the required condition. Here for each 

s23- The second test case

s4- There is no way to reorder the elements of the given array to satisfy the required condition.
The third test case

One possible reordering is [5, 2, 7, 2, 1].

Try solving now

2. 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

    Just followed standard procedures and good design Principles.

    Try solving now
    02
    Round
    Easy
    Video Call
    Duration60 minutes
    Interview date20 Jan 2023
    Coding problem2

    1. Delete Leaf Nodes With Value X

    Moderate
    27m average time
    0/80
    Asked in companies
    MicrosoftDunzoSprinklr

    You are given a binary tree, in which the data present in the nodes are integers. You are also given an integer X.

    Your task is to delete all the leaf nodes with value X. In the process, if the newly formed leaves also have value X, you have to delete them too.

    For example:

    For the given binary tree, and X = 3:
    

    tree

    Problem approach

    Followed standard procedures

    Try solving now

    2. Min Jumps

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

    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.
    
    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
    03
    Round
    Easy
    Video Call
    Duration60 minutes
    Interview date20 Jan 2023
    Coding problem3

    1. Maximum Sum

    Moderate
    35m average time
    70% success
    0/80
    Asked in companies
    DunzoAdobeArcesium

    You are given an array “ARR” of N integers. You are required to perform an operation on the array each time until it becomes empty. The operation is to select an element from the array(let’s say at ith index i.e ARR[i]) and remove one occurrence of the selected element from the array and remove all the occurrences of (ARR[i]-1) and (ARR[i]+1) from the array(if present). Your task is to maximize the sum of selected elements from the array.

    For example, let’s say the given array is [2, 3, 3, 3, 4, 5].

    The maximum possible sum for the given array would be 14. Because if we select one of the 3’s from the array, then one 3 and all occurrences of (3-1) and (3+1) i.e 2 and 4 will be deleted from the array. Now we left with {3,3,5} elements in the array. Then again we select 3 in the next two steps and in both steps 3 will be deleted also (3-1) and (3+1) doesn't exist in the array so nothing extra to delete in both steps. Now we left with only {5} and in the next step, we select the 5 and delete it. Then the array becomes empty. Thus the sum of selected elements will be 3+3+3+5 = 14.

    Problem approach

    The idea is to use a bottom-up dynamic programming approach instead of a memoization approach. In this, we also have two choices whether to select or not. If we select then we take the occurrences of that number and the value stored at dp[i-2] as dp[i-1] will be deleted and not be taken to count. If we do not select the number then we take dp[i-1] which have been already calculated.

    Try solving now

    2. Networking Question

    How will you use a linked list to simulate 3 TCP/IP packets?

    3. Rearrange The Array

    Easy
    0/40
    Asked in companies
    AmazonAdobeChegg Inc.

    You are given an array/list NUM of integers. You are supposed to rearrange the elements of NUM such that no two adjacent elements will be the same or find out if it not possible.

    For example:
    Input: arr[] = {1,1,1,2,2,2} 
    Output: {1,2,1,2,1,2}
    
    Note: {2,1,2,1,2,1} is also valid because there are no two adjacent elements which are the same.
    
    Problem approach

    Greedy with Priority Queue

    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
    Software Developer
    3 rounds | 9 problems
    Interviewed by Mercer Mettl
    973 views
    0 comments
    0 upvotes
    SDE - 1
    2 rounds | 4 problems
    Interviewed by Mercer Mettl
    922 views
    0 comments
    0 upvotes
    SDE - 1
    2 rounds | 4 problems
    Interviewed by Mercer Mettl
    971 views
    0 comments
    0 upvotes
    Companies with similar interview experiences
    company logo
    Software Developer
    5 rounds | 14 problems
    Interviewed by Microsoft
    3931 views
    1 comments
    0 upvotes
    company logo
    Software Developer
    6 rounds | 12 problems
    Interviewed by SAP Labs
    2806 views
    0 comments
    0 upvotes
    company logo
    Software Developer
    3 rounds | 3 problems
    Interviewed by Amazon
    1134 views
    0 comments
    0 upvotes