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

SDE - Intern

GoMechanic
upvote
share-icon
3 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 Months
Topics: DS, OOPS, NETWORKING, ARRAYS, STRINGS, GRAPHS AND TREES
Tip
Tip

Tip 1 : practice questions and prepare for your future and do your best to get success in life

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : must include your project in your resume to give a proper idera about your capabilities and four talent 
Tip 2 : also must include your training and complete experience and learning of your training

Interview rounds

01
Round
Easy
Online Coding Interview
Duration120 Minutes
Interview date8 Jan 2021
Coding problem3

It is vesy helpful to learn more about this topic and improve my knowledge in the specific areas

1. Puzzle

You are blindfolded and 10 coins are placed in front of you on the table. You are allowed to touch the coins but can’t tell which way up they are by feel. You are told that there are 5 coins head up, and 5 coins tails up but not which ones are which. 

Can you make two piles of coins each with the same number of heads up? You can flip the coins any number of times. 

2. Buy and Sell Stock

Hard
0/120
Asked in companies
SalesforceMicrosoftGoldman Sachs

You are Harshad Mehta’s friend. He told you the price of a particular stock for the next ‘n’ days.


You are given an array ‘prices’ which such that ‘prices[i]’ denotes the price of the stock on the ith day.


You don't want to do more than 2 transactions. Find the maximum profit that you can earn from these transactions.


Note

1. Buying a stock and then selling it is called one transaction.

2. You are not allowed to do multiple transactions at the same time. This means you have to sell the stock before buying it again. 
Example:
Input: ‘n’ = 7, ‘prices’ = [3, 3, 5, 0, 3, 1, 4].

Output: 6

Explanation: 
The maximum profit can be earned by:
Transaction 1: Buying the stock on day 4 (price 0) and then selling it on day 5 (price 3). 
Transaction 2: Buying the stock on day 6 (price 1) and then selling it on day 6 (price 4).
Total profit earned will be (3 - 0) + ( 4 - 1) = 6. 
Try solving now

3. Time To Burn Tree

Hard
50m average time
50% success
0/120
Asked in companies
OLX GroupPhonePeMicrosoft

You have a binary tree of 'N' unique nodes and a Start node from where the tree will start to burn. Given that the Start node will always exist in the tree, your task is to print the time (in minutes) that it will take to burn the whole tree.


It is given that it takes 1 minute for the fire to travel from the burning node to its adjacent node and burn down the adjacent node.


For Example :
For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3

    1
   / \
  2   3
     / \
    4   5

Output: 2

Explanation :
In the zeroth minute, Node 3 will start to burn.

After one minute, Nodes (1, 4, 5) that are adjacent to 3 will burn completely.

After two minutes, the only remaining Node 2 will be burnt and there will be no nodes remaining in the binary tree. 

So, the whole tree will burn in 2 minutes.
Try solving now
02
Round
Easy
Online Coding Interview
Duration120 Minutes
Interview date7 Jan 2021
Coding problem3

1. Pair Sum

Easy
15m average time
90% success
0/40
Asked in companies
Thought WorksMedia.netExpedia Group

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

Note:

Each pair should be sorted i.e the first value should be less than or equals to the second value. 

Return the list of pairs sorted in non-decreasing order of their first value. In case if two pairs have the same first value, the pair with a smaller second value should come first.
Try solving now

2. Delete middle node

Easy
15m average time
95% success
0/40
Asked in companies
GrowwAdobeMicrosoft

Given a singly linked list of 'N' nodes. Your task is to delete the middle node of this list and return the head of the modified list.


However, if the list has an even number of nodes, we delete the second middle node


Example:
If given linked list is 1->2->3->4 then it should be modified to 1->2->4.
Try solving now

3. Puzzle

There are 4 persons (A, B, C and D) who want to cross a bridge in night.

  1. A takes 1 minute to cross the bridge.
  2. B takes 2 minutes to cross the bridge.
  3. C takes 5 minutes to cross the bridge.
  4. D takes 8 minutes to cross the bridge.

There is only one torch with them and the bridge cannot be crossed without the torch. There cannot be more than two persons on the bridge at any time, and when two people cross the bridge together, they must move at the slower person’s pace.

03
Round
Easy
Online Coding Interview
Duration50 Minutes
Interview date14 Jan 2021
Coding problem2

1. Different Ways To Add Parenthesis

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

You are given a string 'S' containing an arithmetic expression. Your task is to return all the possible results obtained after putting the valid parenthesis.

It is guaranteed that the given string only contains the ‘+’, ‘-’, ‘*’ operator.

The valid expression is an expression where a number of closing and opening parenthesis is the same. And the result is computed by solving inner parentheses first.

For example:
S = 2 * 3 - 2
((2 * 3) - 2) = 4
(2 * (3 - 2)) = 2 , [4, 2] or [2, 4] are the solution.
Try solving now

2. General Questions

Why should we hire you?

What projects you have worked on?

Why do you think you will get to do?

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 the purpose of the return keyword?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4782 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
1012 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6543 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3567 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Arcesium
3713 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Arcesium
2667 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by BNY Mellon
2336 views
0 comments
0 upvotes