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

SDE - 1

PharmEasy
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I started my journey from a government school where I was first introduce with the computer when i was at my 11 th standard now I am a software developer.
Application story
This company visited to my campus the placement .
Why selected/rejected for the role?
i was rejected because i was not able to maintain the timing of the questions to be answer i should be more fast.
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Practice coding from Leetcode, Interview bit, at least 100 questions 
Tip 2 : Practice any one automation framework includes design patterns

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Restrict your resume to 1 page and write your practical work only
Tip 2 : Mention top topics like Selenium, Rest Assured Automation, Language used Java etc

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date3 Feb 2023
Coding problem2

1. Minimum Cost

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

There are ‘N’ numbers of balls in a room that are placed in a row. You are given an array ‘location’ where location[ i ] denotes the location of the ‘i-th’ ball.

You have to move all the balls at the same location, and it is given that you can move a ball from position [ i ] to

1. position[i] + 2 with cost = 0.

2. position[i] + 1 with cost = 1.

Your task is to find the minimum cost required to move all the balls at the same location.

For Example :
If we have three balls placed at [ 1, 3, 4 ]

At first, move the ball from position ‘1’ to position ‘3’ with cost = 0.
Then move the ball from position ‘4’ to position ‘3’ with cost =1.
As the minimum cost = 1, so you need to print 1.
Problem approach

You are given an array of ‘N’ integers and your task is to sort the array using the following operations.
In one operation you can select a sub-array of the array and sort it. The cost of performing such an operation will be the square of the length of the sub-array you are sorting.
You task is to find the minimum cost of sorting the whole array.

Try solving now

2. Longest Increasing Subsequence

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

For a given array with N elements, you need to find the length of the longest subsequence from the array such that all the elements of the subsequence are sorted in strictly increasing order.

Strictly Increasing Sequence is when each term in the sequence is larger than the preceding term.

For example:
[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.
Problem approach

For a given array with N elements, you need to find the length of the longest subsequence from the array such that all the elements of the subsequence are sorted in strictly increasing order.
Strictly Increasing Sequence is when each term in the sequence is larger than the preceding term.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date3 Feb 2023
Coding problem2

1. Word Ladder

Hard
10m average time
90% success
0/120
Asked in companies
GoogleOlaSalesforce

You are given two strings BEGIN and END and an array of strings DICT. Your task is to find the length of the shortest transformation sequence from BEGIN to END such that in every transformation you can change exactly one alphabet and the word formed after each transformation must exist in DICT.

Note:

1. If there is no possible path to change BEGIN to END then just return -1.
2. All the words have the same length and contain only lowercase english alphabets.
3. The beginning word i.e. BEGIN will always be different from the end word i.e. END (BEGIN != END).
Problem approach

You are given two strings BEGIN and END and an array of strings DICT. Your task is to find the length of the shortest transformation sequence from BEGIN to END such that in every transformation you can change exactly one alphabet and the word formed after each transformation must exist in DICT.

Try solving now

2. Permutations of a String

Moderate
15m average time
85% success
0/80
Asked in companies
GoogleMakeMyTripDisney + Hotstar

You are given a string 'STR' consisting of lowercase English letters. Your task is to return all permutations of the given string in lexicographically increasing order.

String A is lexicographically less than string B, if either A is a prefix of B (and A ≠ B), or there exists such i (1 <= i <= min(|A|, |B|)), that A[i] < B[i], and for any j (1 <= j < i) A[i] = B[i]. Here |A| denotes the length of the string A.

For example :

If the string is “bca”, then its permutations in lexicographically increasing order are { “abc”, “acb”, “bac”, “bca”, “cab”, “cba” }.
Note:
Given string contains unique characters.
Problem approach

You are given a string 'STR' consisting of lowercase English letters. Your task is to return all permutations of the given string in lexicographically increasing order.
String A is lexicographically less than string B, if either A is a prefix of B (and A ≠ B), or there exists such i (1 <= i <= min(|A|, |B|)), that A[i] < B[i], and for any j (1 <= j < i) A[i] = B[i]. Here |A| denotes the length of the string A.

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

Which of the following is not a valid SQL aggregate function?

Choose another skill to practice
Similar interview experiences
SDE - 1
2 rounds | 4 problems
Interviewed by PharmEasy
866 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by PharmEasy
1219 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
2217 views
0 comments
0 upvotes
Software Engineer
3 rounds | 6 problems
Interviewed by PharmEasy
104 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
111209 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
54925 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
33611 views
6 comments
0 upvotes