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

SDE - Intern

Zop Smart
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 8 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Computer Networking, Object Oriented Programming, ML
Tip
Tip

Tip 1 : Never leave any topic from any chapter / Subject
Tip 2 : Learn to explain your thoughts well
Tip 3 : Learn from previous experiences / interviews / problems asked.
Tip 4 : Atleast 4 projects in Resume

Application process
Where: Campus
Eligibility: B.Tech, M.Tech & Intgt CSE, IT 2022 Batch with 7.00 CGPA and above, No Backlogs - Unplaced Only
Resume Tip
Resume tip

Tip 1 : Atleast 4 projects on Resume
Tip 2 : Do not write false things. You always get caught. Be genuine.

Interview rounds

01
Round
Easy
Video Call
Duration60 mins
Interview date19 Aug 2021
Coding problem2

The interviewer was very friendly, he started my interview with my introduction and about my project. Then he asked about my coding ability. He asked me 2 coding questions and some basic concepts of stack.

1. Best Time to Buy and Sell Stock IV

Hard
20m average time
80% success
0/120
Asked in companies
Disney + HotstarAmazonOracle

You have been given an array 'PRICES' consisting of 'N' integers where PRICES[i] denotes the price of a given stock on the i-th day. You are also given an integer 'K' denoting the number of possible transactions you can make.

Your task is to find the maximum profit in at most K transactions. A valid transaction involves buying a stock and then selling it.

Note
You can’t engage in multiple transactions simultaneously, i.e. you must sell the stock before rebuying it.
For Example
Input: N = 6 , PRICES = [3, 2, 6, 5, 0, 3] and K = 2.
Output: 7

Explanation : The optimal way to get maximum profit is to buy the stock on day 2(price = 2) and sell it on day 3(price = 6) and rebuy it on day 5(price = 0) and sell it on day 6(price = 3). The maximum profit will be (6 - 2) + (3 - 0) = 7.
Problem approach

We can find all adjacent valley/peak pairs and calculate the profits easily. Instead of accumulating all these profits like Buy&Sell Stock II, we need the highest k ones.

The key point is when there are two v/p pairs (v1, p1) and (v2, p2), satisfying v1 <= v2 and p1 <= p2, we can either make one transaction at [v1, p2], or make two at both [v1, p1] and [v2, p2]. The trick is to treat [v1, p2] as the first transaction, and [v2, p1] as the second. Then we can guarantee the right max profits in both situations, p2 - v1 for one transaction and p1 - v1 + p2 - v2 for two.

Finding all v/p pairs and calculating the profits takes O(n) since there are up to n/2 such pairs. And extracting k maximums from the heap consumes another O(klgn).

Try solving now

2. JUMP GAME

Moderate
40m average time
35% success
0/80
Asked in companies
GrowwWalmartPolicyBazaar.com

Given an array of non-negative integers ‘ARR’ of length ‘N’, you are initially positioned at the array's first index.

Each element in the array represents your maximum jump length at that position.

Return the minimum number of jumps required to reach the last index.

If it is not possible to reach the last index, return -1.

Example:
Input:

‘N’ = 3
‘ARR’ = [ 2, 1, 1 ]

The shortest way to reach index 2 is
Index 0 => Index 2
that requires only 1 jump.
Problem approach

Idea is to work backwards from the last index. Keep track of the smallest index that can "jump" to the last index. Check whether the current index can jump to this smallest index.

Try solving now
02
Round
Easy
Video Call
Duration60 mins
Interview date19 Aug 2021
Coding problem1

This round was taken by a lead engineer was had experience in companies like snap deal and had focused mainly on my projects as they were in ML and he had experience in this domain. In the end he asked 1 good DSA question and completed the interview.

1. LFU Cache

Moderate
0/80
Asked in companies
SalesforceOLX GroupDisney + Hotstar

Design and implement a Least Frequently Used(LFU) Cache, to implement the following functions:

1. put(U__ID, value): Insert the value in the cache if the key(‘U__ID’) 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 frequently used item before inserting the new item.

2. get(U__ID): Return the value of the key(‘U__ID’),  present in the cache, if it’s present otherwise return -1.
Note:
  1) The frequency of use of an element is calculated by a number of operations with its ‘U_ID’ performed after it is inserted in the cache.

  2) If multiple elements have the least frequency then we remove the element which was least recently used. 

You have been given ‘M’ operations which you need to perform in the cache. Your task is to implement all the functions of the LFU cache.

Type 1: for put(key, value) operation.
Type 2: for get(key) operation.
Example:
We perform the following operations on an empty cache which has capacity 2:

When operation 1 2 3 is performed, the element with 'U_ID' 2 and value 3 is inserted in the cache.

When operation 1 2 1 is performed, the element with 'U_ID' 2’s value is updated to 1.  

When operation 2 2 is performed then the value of 'U_ID' 2 is returned i.e. 1.

When operation 2 1 is performed then the value of 'U_ID' 1 is to be returned but it is not present in cache therefore -1 is returned.

When operation 1 1 5 is performed, the element with 'U_ID' 1 and value 5 is inserted in the cache. 

When operation 1 6 4 is performed, the cache is full so we need to delete an element. First, we check the number of times each element is used. Element with 'U_ID' 2 is used 3 times (2 times operation of type 1 and 1-time operation of type 1). Element with 'U_ID' 1 is used 1 time (1-time operation of type 1). So element with 'U_ID' 1 is deleted. The element with 'U_ID' 6 and value 4 is inserted in the cache. 
Problem approach

Each key is mapping to the corresponding node (self._node), where we can retrieve the node in O(1) time.

Each frequency freq is mapped to a Doubly Linked List (self._freq), where all nodes in the DLinkedList have the same frequency, freq. Moreover, each node will be always inserted in the head (indicating most recently used).

A minimum frequency self._minfreq is maintained to keep track of the minimum frequency of across all nodes in this cache, such that the DLinkedList with the min frequency can always be retrieved in O(1) time.

Try solving now
03
Round
Easy
HR Round
Duration60 mins
Interview date20 Aug 2021
Coding problem1

It was an HR Round and she asked basic HR questions asked about my internsips and she told me about DOJ and that i have to work from the office and round ended.

1. Basic HR Questions

Tell me about yourself.
What are your strengths and weaknesses?”
where do you see yourself in 5 years?

Problem approach

Tip 1: Just be confident 
Tip 2: Show your willingness to learn even if you are not able to answer any of their questions. They are ready to hire and train employees as per their requirements.
Tip 3: Practice Previously asked 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
company logo
Fullstack Developer
4 rounds | 4 problems
Interviewed by Zop Smart
3550 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 2 problems
Interviewed by Zop Smart
1654 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3451 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15480 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15338 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes