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

SDE - 1

Goodworker
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
This was a job I got from First Naukri, which had three rounds of coding and interviews. First was an online assignment; then, after passing that, there was a DSA round from a third-party platform. Passing that, there was a technical interview with the engineering manager. I started preparing for these interviews about 2-3 months in advance, mainly solving CodeStudio problems. In this timeline, I solved more than 600-700 problems. Other than that, I did OOP and CS fundamentals side by side.
Application story
I got an mail from First Naukri that Goodworker was hiring for SDE-1, so I applied for it. At the time, I was holding some offers from college too, but this gave a better offer than those.
Why selected/rejected for the role?
I was selected because I cracked all the interviews, and I prepared well for them. I kept patience while giving those interviews, and all that daily practice on coding problems came in handy.
Preparation
Duration: 3 months
Topics: Dynamic Programming, Operating System, OOPs, Trees, Arrays
Tip
Tip

Tip 1: Do daily practice questions
Tip 2: Don't forget CS Fundamentals
Tip 3: Have some solid full stack type of projects, which helps them to tell your knowledge in everything

Application process
Where: Naukri
Eligibility: 2022 gradudate
Resume Tip
Resume tip

Tip 1: Include projects that tell Full stack knowledge of any tech you used, even it is less.
Tip 2: Don't make it more than 1 page and too complicated. Make it simple

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date25 May 2022
Coding problem2

2 coding questions were asked.

1. Design Search Autocomplete System

Hard
25m average time
60% success
0/120
Asked in companies
UberTwitterMicrosoft

Ninja has enrolled in a system design course at Coding Ninjas, and his first assignment is to create a search autocomplete system for a search engine.

Ninja is given ‘N’ sentences ‘SENTENCES’ and ‘N’ integers ‘TIMES’, where ‘TIMES’[i] is the number of times the ‘SENTENCES’[i] was typed. Now, the instructor will input a test sentence(at least one word and end with ‘#’). As Ninja’s best friend, can you help him with the assignment?

Your task is to implement the AutocompleteSystemclass:

  • AutocompleteSystem(String[] sentences, int[] times)Initializes the object with the sentences and times arrays.
  • List input(char c)This indicates that the user typed the character c.
    • Returns an empty array [], if c == '#' and stores the inputted sentence in the system.
    • Returns the top 3 historical hot sentences with the same prefix as the sentence already typed. If there are fewer than 3matches, return them all.

Here are the specific rules:

  • A sentence’s hot degree is defined as the number of times a user typed the same sentence before.
  • The returned top 3 hot sentences should be sorted by hot degree (The first is the hottest one). If several sentences have the same hot degree, use ASCII-code order (smaller one appears first).
  • If less than three hot sentences exist, return as many as possible.
  • When the input is a special character, it means the sentence ends, and in this case, you need to return an empty list.

For Example:

Input:
["AutocompleteSystem","input","input","input"]
[[["i want to join faang","icecream","i love coding ninjas"],[4,3,1],["i"],["s"],["#"]]

Output:
[null,["i want to join faang","icecream","i love coding ninjas"],[],[]]

Explanation:
* AutocompleteSystem obj = new AutocompleteSystem(["i want to join faang","icecream","i love coding ninjas"],[4,3,1]); 
* obj.input(“i”); // return ["i want to join faang","icecream","i love coding ninjas"]. There are three sentences that have prefix "I".
* obj.input(“s”); // return []. There is no sentence with prefix “is”
* obj.input(“#”); // return [].
Problem approach

Step 1: Went with a brute approach first, told him about the time complexity it would take. 

Step 2: Told him this could be improved if we used Tries here. Told him how I would implement it, the whole process, and time complexity, then coded it.

Try solving now

2. Next Greater Element II

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

You are given a circular array 'a' of length 'n'.


A circular array is an array in which we consider the first element is next of the last element. That is, the next element of 'a[n - 1]' is 'a[0]'.


Find the Next Greater Element(NGE) for every element.


The Next Greater Element for an element 'x' is the first element on the right side of 'x' in the array, which is greater than 'x'.


If no greater elements exist to the right of 'x', consider the next greater element as -1.


Example:
Input: 'a' = [1, 5, 3, 4, 2]

Output: NGE = [5, -1, 4, 5, 5]

Explanation: For the given array,

- The next greater element for 1 is 5.

- There is no greater element for 5 on the right side. So we consider NGE as -1.

- The next greater element for 3 is 4.

- The next greater element for 4 is 5, when we consider the next elements as 4 -> 2 -> 1 -> 5.

- The next greater element for 2 is 5, when we consider the next elements as 2 -> 1 -> 5.
Problem approach

Step 1: Told him the brute approach of looping twice nestedly and filling the resultant array; told him the time complexity O(n^2). 

Step 2: Told him the new optimized approach using Stack; told him why using the stack improves it and why this came to my mind. 

Step 3: Implemented it and told him the complexity.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date28 May 2022
Coding problem2

1. Search In Rotated Sorted Array

Moderate
30m average time
65% success
0/80
Asked in companies
FreshworksExpedia GroupPayPal

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].

After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.

For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Note:

Can you solve each query in O(logN) ?
Problem approach

Step 1: Went with brute force first to do a linear search, told him why it’s not a good approach.  
Step 2: Optimized it by telling him binary search can be a way, related it to simple binary search but first divided it into portions where to search, depending upon where the target will lie.  
Step 3: Told him the implementation, coded it, and explained the time complexity.

Try solving now

2. Valid Parentheses

Easy
10m average time
80% success
0/40
Asked in companies
OracleAmerican ExpressPayPal

You're given a string 'S' consisting of "{", "}", "(", ")", "[" and "]" .


Return true if the given string 'S' is balanced, else return false.


For example:
'S' = "{}()".

There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
Try solving now
03
Round
Easy
HR Round
Duration
Interview date3 Jun 2022
Coding problem1

1. Basic HR Questions

Introduce yourself briefly.

What do you mean by innovation?

What can you offer to us in terms of your past work?

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
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
Analytics Consultant
3 rounds | 10 problems
Interviewed by ZS
907 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3319 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2580 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114578 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57824 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34960 views
7 comments
0 upvotes