PharmEasy Interview Experience for Software Engineer 1 – On Campus 2020
Written Round: This round consists of 6 GATE level easy MCQs(Sorting + Time Complexity + DSA) [4/6 marks] with 1 coding questions the coding question was different for every set [20 marks]
Mine seems incorrect question:
- It was Given: 2 doctors in a city [A & B] and N medicines. When a doctor’s turns come he either picks 1 medicine or n medicine [greedy]. Consider A’s turns come first always. Give an N, tell who will take medicine and print according to ‘A’ or ‘B’
Confusing, right? I was confused and tried some custom test case to get idea
Tried n as 0-20 – observed for n = 3 -> it returned ‘B’ else every time ‘A’
if(n == 3) return ‘B’ else return ‘A’;
All test cases got cleared. Selected for written (only 8 students were shortlisted – may be tough questions on other sets)
Round 2(Personal Interview): 8 were shortlisted. Starting with a brief intro, he just joined the org in Jan, 8 months only. The guy was very friendly.
He asked me for an introduction, then moved onto my resume. He selected one project among 3 and went deep into that, also tried to modify some cases and asked how would you handle this. I personally spent lots of time on that project, and this section was smooth.
He started with DSA: 2 questions (easy)
- Given a string(consisting of lowercase alphabets only), return true if all chars are unique else false. I told him a HashSet based approach, he was happy, also conveyed since chars are limited we can do it with arr as well. Code was required, he asked me to run for some test cases, code ran fine.
- Given a binary tree, return a mirrored Binary Tree. Just the approach was needed, I told him about swapping left and right children are needed, and he was okay with the approach.
Since this all ended within 30 mins, he tried some more questions and asked me if I knew about rabbitMQ and others, I told him that I have a little idea only, and also, I told him that I want to ask some questions, to which he was happy to tell.
I asked him certain questions, and that I had doubts with, and that was to this round.
Round 3 (Hiring Manager Round): 5 were shortlisted for this round
- Introduce yourself
- What is Cache – explained well
- DBMS Ques – ACID properties
I told I am not very much familiar with DBMS, but ACID I can try and explain
A: Availability - later, she pointed out and I told Atomicity C: Consistency - explained I: Isolation - Explained D: Durability - wasn’t able to re-collect
Proceeded to code: Given an array of integers – return triplets. Triplets: a1, a2, a3 is a triplet if a1 + a2 = a3
There can be duplicates, I said like it would have been easy if there are no duplicates. She said, let’s first solve that case.
I gave a brute force approach – O(N^3), to which she asked for optimization. I gave O(n^2) time + O(n) space approach – using HashSet
To which she said, can you reduce space? I tried and came up with 2 pointer approach – O(n^2) time + O(1) space
She asked me to code, which I did. Later she asked me to handle duplicates
I tried many approaches, but they were failing for certain test cases.
Later after 2-3 different approach, I was able to come to the solution, that was by maintaining counts and remove duplicates
Later, she asked if I had any questions. I asked her regarding the company’s policy for the COVID-19 situation.
This round took 1hr 10 minutes in total
Didn’t get shortlisted for Final Round – HR
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.