Lenskart Interview Experience For SDE-2
Last Updated :
28 Feb, 2024
Telephonic Conversation with HR (5-10 mins)
HR asked a few questions about the current organization – CTC drawn, Expected CTC, tech stack etc.
HR explained the interview process – 3 Technical Rounds
- Technical Round 1 – DSA + CS Fundamentals
- Technical Round 2 – Heavy on Coding (System Design)
- Technical Round 3 – Techno Managerial
Technical Round 1: (DSA + CS Fundamentals) ( 1 hr)
Project Discussion- (20 mins)
The interviewer was a tech lead at Lenskart with around 8-9 years of experience.
We started discussing about the project in my previous company which was in Java and Spring boot tech stack. Various questions around it – Database, Microservices, Deployment etc.
Tip: Be thorough with the project regarding its db schema, why only that design is followed, ways of improvement etc.
Problem:
You are given a list of songs where the song has a duration of time[i] seconds.
Return the number of pairs of songs for which their total duration in seconds is multiple of 60.
Example 1:
Input: time = [30,20,150,100,40]
Output: 3
Example 2:
Input: time = [60,60,60]
Output: 3
I gave the brute force solution, which was an O(n^2) solution. He asked me to optimize it further.
I came up with a hash map approach but it seems like my approach was incorrect. So, I told him that I could not optimize it further.
Then we jump to the next question –
Implement the operations add() and present () of a HashSet in O(1) time.
- I tried implementing it using the hash function and tried to achieve O(1) time.
- There were counter questions on how hashset and hashmap are implemented internally.
- Questions regarding loading factor, collisions etc. were asked.
- I was able to explain all of the concepts.
The last question was based on SQL
In an Employee table, employees belong to three different locations – Bengaluru, Delhi and Chennai. We need to return the count of all the employees belonging to these cities.
I gave the query using group by element, he was satisfied with it.
Conclusion – He asked if I had any questions and then we ended the call.
Overall experience was good, The Interviewer was supportive. However, I knew that due to the lack of problem optimization, I may not be able to get through this round. So, the tip is to revise all the DSA concepts well with the main focus on arrays and strings.
Verdict: Got the rejection mail after half an hour from HR.
Share your thoughts in the comments
Please Login to comment...