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

SDE - 1

Practo
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Data structures, OOPS, Algorithms, DBMS, Computer Networks, System Design
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: No criteria but those Available to join for internship immediately were Preferred
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
Medium
Online Coding Interview
Duration90 Minutes
Interview date7 Mar 2022
Coding problem2

The test start login time was 05:00 PM IST and the end login time was 05:45 PM although those started late did not get the full time.

1. Smallest string

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

You are given two integers, ‘N’ and ‘V’. You need to construct a string having length ‘N’ and numeric value ‘V’.

The numeric value of a character is determined by its position in alphabets( 1- indexed)

For Example-

The numeric value of ‘a’ is 1, ‘b’ is 2.

The numeric value of a string is determined by adding the numeric value of all its characters.

For Example -

The numeric value of “bde” is 2 + 4 + 5, i.e. 11.

Example:

If 'N' = 3 and 'V' = 10, you need to construct string as “aah".
Problem approach

We make a copy of our string s (x in code) and then iterate over the string s.
Now in the current iteration if j is greater than or equal to m that means that we have seen at least m elements, so we can check whether the substring of last m characters is equal to part or not. If it is equal, we reduce the variable 'j' by m showing that we have removed this substring and now we will overwrite the characters from index j.
Finally we will return the substring of x of length j.

Try solving now

2. Allocate Books

Moderate
10m average time
90% success
0/80
Asked in companies
PayUIBMZS

Given an array ‘arr’ of integer numbers, ‘arr[i]’ represents the number of pages in the ‘i-th’ book.


There are ‘m’ number of students, and the task is to allocate all the books to the students.


Allocate books in such a way that:

1. Each student gets at least one book.
2. Each book should be allocated to only one student.
3. Book allocation should be in a contiguous manner.


You have to allocate the book to ‘m’ students such that the maximum number of pages assigned to a student is minimum.


If the allocation of books is not possible, return -1.


Example:
Input: ‘n’ = 4 ‘m’ = 2 
‘arr’ = [12, 34, 67, 90]

Output: 113

Explanation: All possible ways to allocate the ‘4’ books to '2' students are:

12 | 34, 67, 90 - the sum of all the pages of books allocated to student 1 is ‘12’, and student two is ‘34+ 67+ 90 = 191’, so the maximum is ‘max(12, 191)= 191’.

12, 34 | 67, 90 - the sum of all the pages of books allocated to student 1 is ‘12+ 34 = 46’, and student two is ‘67+ 90 = 157’, so the maximum is ‘max(46, 157)= 157’.

12, 34, 67 | 90 - the sum of all the pages of books allocated to student 1 is ‘12+ 34 +67 = 113’, and student two is ‘90’, so the maximum is ‘max(113, 90)= 113’.

We are getting the minimum in the last case.

Hence answer is ‘113’.
Problem approach

We fix a value for the number of pages as mid of current minimum and maximum. We initialize minimum and maximum as 0 and sum-of-all-pages respectively. If a current mid can be a solution, then we search on the lower half, or in the higher half.
we need to check if we can assign pages to all students in a way that the maximum number doesn’t exceed the current value. To do this, we sequentially assign pages to every student while the current number of assigned pages doesn’t exceed the value. In this process, if the number of students becomes more than m, then the solution is not feasible. Else feasible.

Try solving now
02
Round
Easy
Video Call
Duration30 Minutes
Interview date16 Mar 2022
Coding problem2

All my Technical interviews were completed in a single day. A candidate was moved to the next round depending on its performance in the previous round. Interview started at 11 AM and was held over Google meet.2 DSA Questions were asked and it ended with a discussion on my projects and tech stack on which i have worked

1. Minimum insertions to make a string palindrome

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

A palindrome string is one that reads the same backward as well as forward.


You are given a string 'str'.


Find the minimum number of characters needed to insert in 'str' to make it a palindromic string.


Example :
Input: 'str' = "abca"

Output: 1

Explanation:
If we insert the character ‘b’ after ‘c’, we get the string "abcba", which is a palindromic string. Please note that there are also other ways possible.


Problem approach

Define the function transformation to calculate the Minimum number of deletions and insertions to transform one string into another
We write the condition for base cases
Checking the wanted condition
If the condition is satisfied we increment the value and store the value in the table
If the recursive call is being solved earlier than we directly utilize the value from the table
Else store the max transformation from the subsequence
We will continue the process till we reach the base condition
Return the DP [-1][-1]

Try solving now

2. Next Greater Element

Easy
10m average time
90% success
0/40
Asked in companies
IBMInfo Edge India (Naukri.com)Amazon

You are given an array 'a' of size 'n'.



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.


For example:
Input: 'a' = [7, 12, 1, 20]

Output: NGE = [12, 20, 20, -1]

Explanation: For the given array,

- The next greater element for 7 is 12.

- The next greater element for 12 is 20. 

- The next greater element for 1 is 20. 

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

Initialise a stack st.
Push the first element of the array into the stack.
Iterate from i = 1 till i = N – 1 and for each i, check whether the current element:
A[i] > st.top(), keep popping elements from the stack, until an element greater than A[i] appears in the stack. The current element A[i] is the next greater element for each of the popped elements.
A[i] < st.top(), push it into the stack.
Continue traversing till the end of the array.
At last, pop out the remaining elements of the stack and print -1, since no next greater element exists for them.

Try solving now
03
Round
Medium
Video Call
Duration30 Minutes
Interview date18 Mar 2022
Coding problem2

The next round was conducted on the same day at 2:30 PM. This round was taken by a senior engineer at Practo on Google Meet. He started with a brief introduction and was very interested in the projects I have worked on. The discussion went on for around 15 minutes, then moved to one DSA question and some basic DBMS questions, and a discussion about the tech stack and vision of the company.

1. Group Anagrams

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

You have been given an array/list of strings 'inputStr'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one another.

An anagram is a word or phrase formed by rearranging the letters of a different word or phrase. We can generalize this in string processing by saying that an anagram of a string is another string with the same quantity of each character in it, in any order.

Note:
The order in which the groups and members of the groups are printed does not matter.
For example:
inputStr = {"eat","tea","tan","ate","nat","bat"}
Here {“tea”, “ate”,” eat”} and {“nat”, “tan”} are grouped as anagrams. Since there is no such string in “inputStr” which can be an anagram of “bat”, thus, “bat” will be the only member in its group.
Problem approach

Just create a map keyed by all of the sorted and unique words, and its value corresponds with a vector consisting of all the strings that when sorted, result in the key.

Try solving now

2. DBMS based questions

What are indexes
What is a join in the SQL, explain types of join

Problem approach

Tip 1: Be clear with the explanation
Tip 2: if any question requires explanation use the resource that is provided for explaining
Tip 3: study the most important questions. you can use Codestudio for that

04
Round
Easy
HR Round
Duration10 Minutes
Interview date18 Mar 2022
Coding problem1

Asked Basic Hr questions, Compensation, and previous offers

1. Basic HR questions

Why do you want to join Practo? 

What do you know about the company? 

Discussion About the location, any other offers, and compensation

Problem approach

Tip 1 : Be confident
Tip 2 : Read what the Company is working on and its products
Tip 3 : Prepare Standard Hr questions

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 Developer
4 rounds | 17 problems
Interviewed by Practo
1743 views
0 comments
0 upvotes
SDE - 1
3 rounds | 6 problems
Interviewed by Practo
1068 views
0 comments
0 upvotes
SDE - 1
3 rounds | 6 problems
Interviewed by Practo
996 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Practo
893 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes