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

Software Engineer

Keyideas
upvote
share-icon
2 rounds | 16 Coding problems

Interview preparation journey

expand-icon
Journey
I started my journey by getting admission to NSUT. After exploring different coding languages and taking guidance from seniors I started coding in C++ as it can help me at a competitive level. After learning this, I started learning full-stack development from coding ninjas. I have projects related to full-stack development. After this in 3rd year, I made a mini project and currently working on a major project.
Application story
I applied for the job through their career page and I also had a referral, and after a few days, I received an email confirming my shortlisting for the online assessment. Soon after, I received an email for the technical round, followed by the HR round
Why selected/rejected for the role?
I was not selected after the technical round as I was not able to give optimized solutions for the coding questions that they asked, and also they wanted a person who was good at Java.
Preparation
Duration: 2 months
Topics: HTML, CSS, React, SQL, Rest API, DSA, Java Script, MongoDB
Tip
Tip

Tip 1: Make interactive projects based on full-stack development.
Tip 2: Practice at least 250 questions of DSA
Tip 3: Do not write anything that you are not confident of in your resume

Application process
Where: Referral
Eligibility: 7 CGPA
Resume Tip
Resume tip

Tip 1: Make your resume short and crisp.
Tip 2: Do not put false things on your resume
Tip 3: Don't put irrelevant information on the resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date28 Dec 2023
Coding problem8

There were 3-4 coding questions, out of which 2 were of easy-medium difficulty level, and 1 was of medium level.

1. Minimum Platforms for Train Station

Moderate
30m average time
70% success
0/80
Asked in companies
MeeshoGrabAmazon

Given the arrival and departure times of all trains that reach a railway station, the task is to find the minimum number of platforms required for the railway station so that no train waits. We are given two arrays that represent the arrival and departure times of trains that stop.

Problem approach

Store the arrival time and departure time and sort them based on arrival time then check if the arrival time of the next train is smaller than the departure time of the previous train if it is smaller then increment the number of the platforms needed otherwise not.

Store the arrival time and departure time in array arr and sort this array based on arrival time
Declare a priority queue(min-heap) and store the departure time of the first train also declare a counter cnt and initialize it with 1.
Iterate over arr from 1 to n-1 
check if the arrival time of the current train is less than or equal to the departure time of the previous train which is kept on top of the priority queue
If true, then push the new departure time and increment the counter cnt
otherwise, we pop() the departure time
push new departure time in the priority queue
Finally, return the cnt.

Try solving now

2. Search in Rotated Sorted Array

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

Given a sorted and rotated array arr[] of size N and a key, the task is to find the key in the array.

Problem approach

The idea is to find the pivot point, divide the array into two sub-arrays, and perform a binary search.

The main idea for finding a pivot is – 

For a sorted (in increasing order) and rotated array, the pivot element is the only element for which the next element to it is smaller than it.
Using a binary search based on the above idea, a pivot can be found.
It can be observed that for a search space of indices in the range [l, r] where the middle index is mid, 
If rotation has happened in the left half, then obviously the element at l will be greater than the one at mid.
Otherwise, the left half will be sorted but the element at mid will be greater than the one at r.
After the pivot is found divide the array into two sub-arrays.
Now the individual sub-arrays are sorted so the element can be searched using Binary Search.

Try solving now

3. Zero Sum Subarray Check

Easy
0/40
Asked in companies
MicrosoftOYOAmazon

Given an array of positive and negative numbers, the task is to find if there is a subarray (of size at least one) with 0 sum.

Problem approach

The idea is to iterate through the array and for every element arr[i], calculate the sum of elements from 0 to i (this can be done as sum += arr[i]). If the current sum has been seen before, there must be a zero-sum subarray. Hashing is used to store the sum values so that the sum can be stored quickly and find out whether the current sum is seen before or not.

Follow the given steps to solve the problem:

1) Declare a variable sum, to store the sum of prefix elements
2) Traverse the array and at each index, add the element into the sum and check if this sum exists earlier. If the sum exists, then return true
3) Also, insert every prefix sum into a map, so that later on it can be found whether the current sum is seen before or not
4) At the end return false, as no such subarray is found

Try solving now

4. Alternate Maximum-Minimum Arrangement

Moderate
15m average time
90% success
0/80
Asked in companies
AdobeMicrosoftThought Works

Given a sorted array of positive integers, rearrange the array alternately i.e. first element should be a maximum value, at the second position minimum value, at the third position second max, at the fourth position second min, and so on.

Problem approach

The idea is to use an auxiliary array. We maintain two pointers one to the leftmost or smallest element and the other to the rightmost or largest element. Move both pointers toward each other and alternatively copy elements at these pointers to an auxiliary array. Finally, Copy the auxiliary array back to the original array.

Try solving now

5. Condition on Empty Queue Pop Operation

When a pop() operation is called on an empty queue, what is the condition called? (Link)

6. Selection Sort

What is the maximum number of swaps that can be performed in the Selection Sort algorithm?

Problem approach

Ans:- n-1

7. Foreign key & Primary key

What does a foreign key combined with a primary key create? (Link)

Problem approach

Ans:- Network model between the tables that connect them

8. Output based

What will be the output of the following code snippet?

void solve() {
int a[] = {1, 2, 3, 4, 5};
int sum = 0;
for(int i = 0; i < 5; i++) {
if(i % 2 == 0) {
sum += a[i];
}
}
cout << sum << endl;
}

02
Round
Medium
Video Call
Duration60 minutes
Interview date3 Jan 2024
Coding problem8

The interviewer asked coding questions and questions from my resume.

1. Palindrome Sentence Checker

Easy
10m average time
90% success
0/40
Asked in companies
SprinklrCIS - Cyber InfrastructureSamsung

Write a program to check if a sentence is a palindrome or not. You can ignore white spaces and other characters to consider sentences as a palindrome.

Problem approach

1) Convert all the letters in a sentence to lowercase. 
2) Use String.erase() method on the sentence to erase the white space in between the sentences.
3) Use the reverse method to reverse the sentence. 
4) Checked the sentence reversed the sentence and returned the result.

Try solving now

2. Minimum Coins for Target Value

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

Given an array coins[] of size N and a target value V, where coins[i] represent the coins of different denominations. You have an infinite supply of each of the coins. The task is to find the minimum number of coins required to make the given value V. If it’s not possible to make a change, print -1.

Problem approach

The idea is to find the Number of ways of Denominations By using the Top Down (memorization).

Algorithm:

Creating a 2-D vector to store the Overlapping Solutions
Keep Track of the overlapping subproblems while Traversing the array coins[]
Recall them whenever needed.

Try solving now

3. Components in ReactJS

How to create components in ReactJS? (Link)

4. Key Concepts in JavaScript and React

What is the difference between the ES6 and ES5 standards? (Link)
and 
Why is there a need for using keys in Lists? (Link)
and 
What are props in React? (Link)

5. RESTful web services

What are payloads in RESTful web services? (Link)

6. REST API based

Explain ‘Addressing’ in RESTful web services. 

7. Quick sort

What is the time complexity of quick sort? (Link)

8. Removing Duplicates from Unsorted Linked List: Logic

Moderate
15m average time
85% success
0/80
Asked in companies
IBMAdobeAmazon

Given an unsorted Linked List, the task is to remove duplicates from the list. Tell me only the logic of this question

Problem approach

1) Traverse the link list from head to end.
2) For every newly encountered element, check whether it is in the hash table:
if yes, remove it
otherwise put it in the hash table.
3) At the end, the Hash table will contain only the unique elements.

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
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
960 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3451 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7873 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
9973 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4310 views
1 comments
0 upvotes