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

SDE - 1

nurture.farm
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
Being from a tier-3 college, I got no opportunities in college as there was no coding culture. I ended up starting my career in a service-based company, where I worked for two years. I worked hard to secure multiple offers and ultimately chose Microsoft from them.
Application story
There was an opening on LinkedIn for the role of Backend Engineer at Nurture.farm. I applied for the opening and received a test link from HR. After that, she scheduled interviews for me.
Why selected/rejected for the role?
Rejected. Interview round 2 did not go as I expected. I was unable to answer some of the questions asked by the interviewer.
Preparation
Duration: 4 months
Topics: Data structures, Algorithms, OOPS, OS, DBMS, Computer Networks, System Design
Tip
Tip

Tip 1: Make sure your computer science fundamentals are crystal clear.

Tip 2: You should know the time complexity of the code you write and understand the internal implementation of the data structures you use while coding.

Tip 3: Be well-versed in everything you mention on your resume.

Tip 4: Practice solving a lot of programming problems and participate in competitive programming contests.

Application process
Where: Linkedin
Eligibility: B.Tech. in Computer Science
Resume Tip
Resume tip

Tip 1: Be honest about what you write in your resume.

Tip 2: Include at least two projects.

Tip 3: Maintain a precise, self-explanatory one-page resume.

Tip 4: Add only technical achievements.

Interview rounds

01
Round
Medium
Video Call
Duration75 minutes
Interview date24 Mar 2022
Coding problem2

The interviewer immediately shared a document with two coding questions and gave me some time to think, followed by a discussion.

1. Bursting Balloons

Moderate
40m average time
60% success
0/80
Asked in companies
Samsung ElectronicsAdobeMicrosoft

You are given an array 'ARR' of N integers. Each integer represents the height of a balloon. So, there are N balloons lined up.

Your aim is to destroy all these balloons. Now, a balloon can only be destroyed if the player shoots its head. So, to do the needful, he/ she shoots an arrow from the left to the right side of the platform, from an arbitrary height he/she chooses. The arrow moves from left to right, at a chosen height ARR[i] until it finds a balloon. The moment when an arrow touches a balloon, the balloon gets destroyed and disappears and the arrow continues its way from left to right at a height decreased by 1. Therefore, if the arrow was moving at height ARR[i], after destroying the balloon it travels at height ARR[i]-1. The player wins this game if he destroys all the balloons in minimum arrows.

You have to return the minimum arrows required to complete the task.

Problem approach
  • Since we need a smaller window's answer for larger windows, we must store the answer for a window of each size from 1 to n.
  • Then, we will have two pointers, left and right, pointing to the two ends of our current window. For example, if we have the array [1,1,2,3,4,5,1] and need to get the answer for the subarray [2,3,4], then left will point to index 2 and right to index 4.
  • Now, within the current window, we must burst the balloons in such a sequence that we obtain the maximum value. To achieve this, we need to check each balloon in the window to determine whether bursting it last yields the maximum value.
  • For this, we traverse the window from left to right, calculating the value each time under the assumption that the i-th balloon is burst last.
  • Thus, while filling the DP table, we populate values for windows in a left-to-right manner. i.e.,
    dp[left][right] = Max(already calculated value, burst this ith balloon last and add left and right subarray points within the window)
    dp[left][right] = max(dp[left][right], arr[left-1] * arr[i] * arr[right+1] + dp[left][i-1] + dp[i+1][right])
Try solving now

2. LRU Cache

Moderate
0/80
Asked in companies
Info Edge India (Naukri.com)OlaExpedia Group
Design a data structure that satisfies the constraints of a Least Recently Used (LRU).
1. Get(int num): If the key exists, it will return the value of the key stored. Else, return -1.    
2. Put(int key, int value): If the key already exists, update the value of the key. Else add the key-value pair to the cache. If the number of keys is more than the capacity for this operation, delete the least recently key used. 
Example:
For the following input: 

4 2
2 1 4
1 1
1 4

We will initialize an empty LRU cache for the first operation with a maximum capacity of 2.
For the first operation, we need to add a key-value pair (1,4) to the cache.
For the second operation, we need to return the value stored for key 1, i.e., 4
For the third operation, we need to return -1, as we don't have any key 4 in the cache.

So, the final output will be: 
4  -1
Problem approach
  • Since we need a smaller window's answer for larger windows, we have to store the answer for each window size from 1 to n.
  • Then, we will use two pointers, left and right, to indicate the two ends of our current window. For example, if we have the array [1,1,2,3,4,5,1] and we need to get the answer for the subarray [2,3,4], then left will point to index 2, and right will point to index 4.
  • Now, within the current window, we need to burst the balloons in such a sequence that we obtain the maximum value. To achieve this, we check for each balloon in the window whether it yields the maximum value when burst last.
  • For this, we traverse from left to right within the window and, at each step, calculate the value assuming the i-th balloon is burst last.
  • Thus, while filling DP, we will compute values for increasing window sizes from left to right.
    dp[left][right] = Max(already calculated value, burst this ith balloon last and add left and right subarray points within the window)
    dp[left][right] = max(dp[left][right], arr[left-1] * arr[i] * arr[right+1] + dp[left][i-1] + dp[i+1][right])
Try solving now
02
Round
Hard
Video Call
Duration75 minutes
Interview date31 May 2023
Coding problem2

The interview was primarily focused on development skills and system design (which I was not prepared for). The interviewer also asked one coding question.

1. System Design

Design a Restaurant Management System.

Problem approach

Tip 1: Prepare for System Design questions.
Tip 2: Prepare for previously asked questions.

2. Maximum Sum

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

You are given an array ‘arr’ consisting of ‘N’ integers. Your task is to maximize the value of 0 * arr[0] + 1 * arr[1] + 2 * arr[2] … (N - 1) * arr[N - 1] . You can rotate the array as many times as you wish.

For Example:
For the given arr[ ] = { 1, 2, 3, 1} 
After 0 rotation arr[ ] = { 1, 2, 3, 1} the sum is = (0 *1 + 1 * 2 + 2 * 3 + 3 * 1) = 11.
After 1 rotation  arr[ ] = { 1, 1, 2, 3} the sum is = (0 *1 + 1 * 1 + 2 * 2 + 3 * 3) = 14.
After 2 rotation arr[ ] = { 3, 1, 1, 2} the sum is = (0 *3 + 1 * 1 + 2 * 1 + 3 * 2) = 9.
After 3 rotation arr[ ] = { 2, 3, 1, 1} the sum is = (0 *2 + 1 * 3 + 2 * 1 + 3 * 1) = 8.
So the maximum sum is 14 when arr[ ] = { 1, 1, 2, 3}.
Problem approach
  • Traverse the array once and keep updating the frequency of its elements in the map.
  • Check whether the size of the map is equal to the total number of distinct elements present in the original array. If true, update the maximum sum.
  • While traversing the original array, if the i-th traversal exceeds K elements, update the map by deleting an occurrence of the (i – K)-th element.
  • After completing the above steps, print the maximum sum obtained.
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

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

Choose another skill to practice
Similar interview experiences
SDE - 1
3 rounds | 6 problems
Interviewed by nurture.farm
2743 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8963 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3502 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2764 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