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

Software Engineer

Protium
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Pointers, Arrays, String, Tree, graph, Dynamic Programming, OOPS, DBMS.
Tip
Tip

Tip 1 : Follow basics of all algorithms and prepare all related questions.
Tip 2 : Try out easy to medium level questions
Tip 3 : Prepare projects, DBMS, OS

Application process
Where: Campus
Eligibility: NO
Resume Tip
Resume tip

Tip 1 : Make it short and crisp
Tip 2 : Must add your projects

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date22 Jul 2021
Coding problem2

It was mostly coding. Firstly I was asked my intro followed by two coding questions. Interviewer was very polite, he first gave his intro and then asked for mine and then he jumped directly onto the coding questions.

1. Find The Repeating And Missing Number

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

You are given an array 'nums' consisting of first N positive integers. But from the N integers, one of the integers occurs twice in the array, and one of the integers is missing. You need to determine the repeating and the missing integer.

Example:
Let the array be [1, 2, 3, 4, 4, 5]. In the given array ‘4’ occurs twice and the number ‘6’ is missing.
Problem approach

Approach 1 - I took a map and iterated over all the elements to store frequency of each element. it helped to find out the repeated number. then sorted the array and start iterating over all the elements from I = 1 until the the missing element is not found. (I was asked to solve it without taking any space)

Approach 2 - let the missing number be x;
let the receptive number be y;
now add all elements of the array sum of all elements => n(n+1)/2 = sum of all elements +x -y (where n is total no of elements)

after this add square of each element => n(n+1)(2n+1)/6 = sum of square of all elements + x^2 - y^2;

now we have two variables and two equations, it can be solved easily.

sum of first n natural number is n(n+1)/2;
sum of square of first n natural numbers is n(n+1)(2n+1)/6

Try solving now

2. Ninja and Two Sorted Arrays

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

Ninja has been given two sorted integer arrays/lists ‘ARR1’ and ‘ARR2’ of size ‘M’ and ‘N’. Ninja has to merge these sorted arrays/lists into ‘ARR1’ as one sorted array. You may have to assume that ‘ARR1’ has a size equal to ‘M’ + ‘N’ such that ‘ARR1’ has enough space to add all the elements of ‘ARR2’ in ‘ARR1’.

For example:

‘ARR1’ = [3 6 9 0 0]
‘ARR2’ = [4 10]
After merging the ‘ARR1’ and ‘ARR2’ in ‘ARR1’. 
‘ARR1’ = [3 4 6 9 10]
Problem approach

Approach 1 ; take another array - add elements from both the arrays to the new array one by one and then sort the new array - time complexity nlogn

Approach 2 - compare each element of array1 and array2, add the smallest element to the new array and increment the iterator from where value is added to the new array until the iterator from both the array reached to the last element

Try solving now
02
Round
Easy
Online Coding Interview
Duration30 minutes
Interview date26 Jul 2021
Coding problem1

Interviewer was a little late during this round because of some production issue. I was asked one coding question and some mcq and also discussed my projects.

1. Container With Most Water

Moderate
15m average time
90% success
0/80
Asked in companies
MicrosoftAmazonSAP Labs

Given a sequence of ‘N’ space-separated non-negative integers A[1],A[2],A[3],......A[i]…...A[n]. Where each number of the sequence represents the height of the line drawn at point 'i'. Hence on the cartesian plane, each line is drawn from coordinate ('i',0) to coordinate ('i', 'A[i]'), here ‘i’ ranges from 1 to ‘N’. Find two lines, which, together with the x-axis forms a container, such that the container contains the most area of water.

Note :
1. You can not slant the container i.e. the height of the water is equal to the minimum height of the two lines which define the container.

2. Do not print anything, you just need to return the area of the container with maximum water.
Example

water-diagram

For the above Diagram, the first red marked line is formed between coordinates (2,0) and (2,10), and the second red-marked line is formed between coordinates (5,0) and (5,9). The area of water contained between these two lines is (height* width) = (5-2)* 9 = 27, which is the maximum area contained between any two lines present on the plane. So in this case, we will return 3* 9=27.
Problem approach

Approach - 1 ; I started running two loops one from I = 0; and another j = I+1 and find out the Oil stored between I & j . if it exceeds the the value of maximumStoredOil(Initialised with INT_MIN) then replace the value in maximumStoredOil
this approach is taking O(n^2) so the interviewer asked me to reduce the time complexity

Approach - 2; I took two pointers ( I = 0, j = n-1), one in the beginning and one in the last. and started finding out the oil stored between the two pipe by (j-i) * min (hight[I], height[j]) . if the minimum height is on the left the we will increment the interator and if it is on the right then we will decrement the iterator ans we will keep finding the height and making a record of maximum stored water

Try solving now
03
Round
Easy
Online Coding Interview
Duration30 minutes
Interview date30 Jul 2021
Coding problem2

This round was taken by the head of engineering. he asked me one coding question and then we discussed our projects.

1. Add Two Numbers As Linked Lists

Moderate
20m average time
80% success
0/80
Asked in companies
Goldman SachsInformaticaFacebook

You are given two non-negative numbers 'num1' and 'num2' represented in the form of linked lists.


The digits in the linked lists are stored in reverse order, i.e. starting from least significant digit (LSD) to the most significant digit (MSD), and each of their nodes contains a single digit.


Calculate the sum of the two numbers and return the head of the sum list.


Example :
Input:
'num1' : 1 -> 2 -> 3 -> NULL
'num2' : 4 -> 5 -> 6 -> NULL

Output: 5 -> 7 -> 9 -> NULL

Explanation: 'num1' represents the number 321 and 'num2' represents 654. Their sum is 975.


Problem approach

So I was getting two linked list
Input 1->2->3
4->5->5
output 5->7->8

1. reverse both the linked list
2. start iterating over both the linked list, take one elements from each list add them and keep the record of carry to take forward. add the summed value in a new linked list.
3. once iteration is complete, check if carry is 1 add one more node with value 1.
4. reverse the sum linked list.
5. return the head of sum linked list

Try solving now

2. System Design Questions

He asked multiple question related to design patterns of my projects-

1. What is difference between monolith and Microservices?
2. What is database sharing?
3. What is master slave architecture?
4. What are the best practices of debugging?

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
Software Engineer
2 rounds | 3 problems
Interviewed by Protium
1079 views
0 comments
0 upvotes
Frontend Engineer
3 rounds | 9 problems
Interviewed by Protium
862 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7874 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