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

SDE - 2

Lenskart
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Break down the total topics based on your comfort and ease and try and master one topic at a time
Tip 2 : Try and up solve
Tip 3 : Always try and come up with multiple solutions for a DSA question starting from brute force to optimal solution.

Application process
Where: Other
Eligibility: Above 1 years of experience
Resume Tip
Resume tip

Tip 1 : Try to keep it short and crisp.
Tip 2 : Always make the entries chronological with the most recent experiences coming first followed by past experiences.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date10 Dec 2021
Coding problem1

1 Medium/Easy DSA questions were asked similar to Leetcode.

I was expected to come up with the most optimal solution for the same. I completed the code and explained in 45 mins.

In the remaining time, I was asked questions from Computer Science fundamentals and Java

1. Unique Element In Sorted Array

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

You are given a sorted array ‘arr’ of ‘n’ numbers such that every number occurred twice in the array except one, which appears only once.


Return the number that appears once.


Example:
Input: 'arr' = [1,1,2,2,4,5,5]

Output: 4 

Explanation: 
Number 4 only appears once the array.


Note :
Exactly one number in the array 'arr' appears once.


Problem approach

As the array was sorted we can make use of this information to use Binary Search.


// EXPLANATION:-
// Suppose array is [1, 1, 2, 2, 3, 3, 4, 5, 5]
// we can observe that for each pair, 
// first element takes even position and second element takes odd position
// for example, 1 is appeared as a pair,
// so it takes 0 and 1 positions. similarly for all the pairs also.

// this pattern will be missed when single element is appeared in the array.

// From these points, we can implement algorithm.
// 1. Take left and right pointers . 
// left points to start of list. right points to end of the list.
// 2. find mid.
// if mid is even, then it's duplicate should be in next index.
// or if mid is odd, then it's duplicate should be in previous index.
// check these two conditions, 
// if any of the conditions is satisfied,
// then pattern is not missed, 
// so check in next half of the array. i.e, left = mid + 1
// if condition is not satisfied, then the pattern is missed.
// so, single number must be before mid.
// so, update end to mid.
// 3. At last return the nums[left]

// Time: - O(logN)
// space:- O(1)

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date15 Dec 2021
Coding problem1

Low-level system design round. 
Expected to come up with a running code.

1. LRU Cache

Moderate
25m average time
65% success
0/80
Asked in companies
OYOHikeWalmart

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.

2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
You will be given ‘Q’ queries. Each query will belong to one of these two types:
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
Note :
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).

2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Problem approach

Tip 1 : Ask clarification questions
Tip 2 : Try and think in terms of brute force and then gradually optimize your solution
Tip 3 : Ensure to check for edge cases
Tip 4 : Ensure to be thorough with data structures, algorithms and system design concepts.

Try solving now
03
Round
Easy
HR Round
Duration30 minutes
Interview date18 Mar 2022
Coding problem1

Standard behavioural questions by HR

1. Basic HR Question

The hiring manager was asking about my past work experiences and past projects in my previous company.

Problem approach

Ensure that you are thorough with the design of your project at your current organization.

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
SDE - 1
4 rounds | 4 problems
Interviewed by Lenskart
1745 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
3319 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2580 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29570 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by HashedIn
9584 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6677 views
1 comments
0 upvotes