nurture.farm interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

nurture.farm
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 Months
Topics: Data structures, oops, algorithms, DBMS, System Design, computer networks
Tip
Tip

Tip 1 : practice previous questions
Tip 2 : attend mock interviews
Tip 3 : make your resume with good projects

Application process
Where: Other
Eligibility: BTech Computer Science, or similar field of study, or equivalent practical experience, Software development experience in one or more general purpose programming languages, Experience working with two or more from the following: mobile application development, distributed computing, machine learning, image processing, developing large software systems, Working proficiency and communication skills in verbal and written English.
Resume Tip
Resume tip

Tip 1 : make it short and attractive
Tip 2 : mention only your top 2 or 3 projects

Interview rounds

01
Round
Easy
Online Coding Test
Duration90 Minutes
Interview date11 Feb 2022
Coding problem3

It was a proctored test. i was given a week to attempt it after that the link would expire. it consisted of 3 coding questions.

1. Number of operations to make Graph connected.

Easy
15m average time
86% success
0/40
Asked in companies
MicrosoftFacebookUber

You have been given a graph consisting of ‘N’ vertices numbered from 1 to ‘N’. The graph has ‘M’ edges. In an operation, you can shift an edge between two directly connected vertices to between pair of disconnected vertices to make them directly connected. Return the minimum number of operations to make the graph connected. If it is not possible to make graph connected return -1.

Example:
Let’s say ‘N’ is 4 and ‘M' is 3. The 3 edges are (1,2), (2,3) and (1,3). Then our graph will look as follows:-

subsequence

To make the graph connected we can shift the edge between (1,3) to (1,4). This operation will make the graph connected. There are multiple ways in which we can make graph connected. So, in this case, we can make graph connected in just one operation.
Note:
1. A connected graph is a graph that is connected in the sense of a topological space, i.e., there is a path from any vertex to any other vertex in the graph.

2. There are no repeated edges and self-loops in the graph.

3. You do not need to print anything; it has already been taken care of. Just implement the function.
Problem approach

We need at least n - 1 cables to connect all nodes (like a tree).
If connections.size() < n - 1, we can directly return -1.

One trick is that, if we have enough cables,
we don't need to worry about where we can get the cable from.

We only need to count the number of connected networks.
To connect two unconneccted networks, we need to set one cable.

The number of operations we need = the number of connected networks - 1

Try solving now

2. 0 1 Knapsack

Easy
15m average time
85% success
0/40
Asked in companies
DelhiveryTwitterWalmart

A thief is robbing a store and can carry a maximal weight of W into his knapsack. There are N items and the ith item weighs wi and is of value vi. Considering the constraints of the maximum weight that a knapsack can carry, you have to find and return the maximum value that a thief can generate by stealing items.

Problem approach

We will use two variables to represent the states of DP. 

‘i’ – The current index we are working on.
‘R’ – It contains the remaining capacity of each and every knapsack.
Now, how will a single variable store the remaining capacity of every knapsack?
For that, we will initialise ‘R’ as R = C + C*(C+1) + C*(C+1)^2 + C*(C+1)^3 ..+ C*(C+1)^(k-1) 
This initialises all the ‘k’ knapsacks with capacity ‘C’.

Now, we need to perform two queries:

Reading remaining space of jth knapsack: (r/(c+1)^(j-1))%(c+1).
Decreasing remaining space of jth knapsack by x: set r = r – x*(c+1)^(j-1).
Now, at each step, we will have k+1 choices. 

Reject index ‘i’.
Put item ‘i’ in knapsack 1.
Put item ‘i’ in knapsack 2.
Put item ‘i’ in knapsack 3.
We will choose the path that maximizes the result.

Try solving now

3. Braille's Dilemma

Hard
24m average time
65% success
0/120
Asked in companies
SprinklrVFISLK Global ServicesCodezero2pi

Abhishek, a blind man has N distinct binary strings all of the equal lengths. A binary string only contains '0's and '1's. The strings are numbered from 1 to N and all are distinct strings. Abhishek can only differentiate between these strings by touching them. In one touch Abhishek can identify one character at a position of any particular string from the set. Your task is to find the minimum number of touches Abhishek has to make so that he finds that all strings are different.

Try solving now
02
Round
Easy
Video Call
Duration75 Minutes
Interview date7 Mar 2022
Coding problem2

This round was conducted on google meet. The interviewer was very helpful and lead a discussion into thought processes/diff approaches. Both questions are online but both were framed differently.

1. Reverse List In K Groups

Hard
15m average time
85% success
0/120
Asked in companies
SAP LabsSamsungIBM

You are given a linked list of 'n' nodes and an integer 'k', where 'k' is less than or equal to 'n'.


Your task is to reverse the order of each group of 'k' consecutive nodes, if 'n' is not divisible by 'k', then the last group of nodes should remain unchanged.


For example, if the linked list is 1->2->3->4->5, and 'k' is 3, we have to reverse the first three elements, and leave the last two elements unchanged. Thus, the final linked list being 3->2->1->4->5.


Implement a function that performs this reversal, and returns the head of the modified linked list.


Example:
Input: 'list' = [1, 2, 3, 4], 'k' = 2

Output: 2 1 4 3

Explanation:
We have to reverse the given list 'k' at a time, which is 2 in this case. So we reverse the first 2 elements then the next 2 elements, giving us 2->1->4->3.


Note:
All the node values will be distinct.


Problem approach

Create a dummy node and point it to the head of input i.e dummy->next = head.
Calculate the length of the linked list which takes O(N) time, where N is the length of the linked list.
Initialize three-pointers prev, curr, next to reverse k elements for every group.
Iterate over the linked lists till next!=NULL.
Points curr to the prev->next and next to the curr next.
Then, Using the inner for loop reverse the particular group using these four steps:\
curr->next = next->next
next->next = prev->next
prev->next = next
next = curr->next
This for loop runs for k-1 times for all groups except the last remaining element, for the last remaining element it runs for the remaining length of the linked list – 1.
Decrement count after for loop by k count -= k, to determine the length of the remaining linked list.
Change prev position to curr, prev = curr.

Try solving now

2. House Robber III

Moderate
35m average time
65% success
0/80
Asked in companies
AdobeServiceNowWunderman Thompson Commerce

The ninja visits an amusement park but finds himself confused because he wants to ride the rides such that he gets maximum fun. The amusement park has only one entrance that is root.

Each ride has a fun number assigned to it and ninja wants to maximize this fun but there is a rule in the park that no one is allowed to ride two directly connected rides.

As the ninja is smart and good in programming because he did a course from coding ninja, he found immediately that park rides are connected like binary tree where the root is the root of the binary tree. Help the ninja to get the maximum fun this time.

Problem approach

dfs all the nodes of the tree, each node return two number, int[] num, num[0] is the max value while rob this node, num[1] is max value while not rob this value. Current node return value only depend on its children's value. Transform function should be very easy to understand.

Try solving now
03
Round
Easy
Video Call
Duration50 Minutes
Interview date11 Mar 2022
Coding problem1

It was a system design round taken by a senior engineer on google meet

1. Technical Questions

Design an Uber booking system where Uber drivers constantly update their location and app users can make a booking and get the closest drivers.
I was given around 25 minutes to identify the various entities involved in the system, establish the relationships between these entities and also identify the primary key - foreign key constraints. After 25 minutes, we had a good discussion on my findings and corrections with respect to certain attributes I may have missed out on in my design. 
A few complex SQL queries were also asked related to the above schemas.
Unfortunately After this round i did not a get follow up from HR. so i assume that i was rejected.

Problem approach

Tip 1 :  Requirements clarifications. ask the interviewer about the requirements before going to a solution
Tip 2 : Have justifications for the points you make
Tip 3 : Be aware of the current solutions and tech practices

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4898 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by nurture.farm
701 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6638 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3639 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes