Open In App

Oyo Interview Experience | 3.5 years Experienced for SDE-2

Last Updated : 09 Dec, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

This was for Hyderabad location .

Round 1:

1.Maximize happiness problem. Given number of days and number of activities we need to maximize sum of happiness . We can not do two same activity in consecutive day.  This is 2d Array with column is day number and row is activity. a[i][j] will represent doing ith activity on jth day will give you happiness say x.

This can be solved using DP table. something like :dp[i][j] = max(dp[i-1][j], dp[i+1][j, ….)

2. Given a list or may be array(upto our implementation) and some input like (type, value).  for type=1 add item to left end of list and for type =2 add item to right end of array. and then there will be a query say type, index1, index 2. so for type =3 we need to return sum of index from index1 to index2. where 0 start from left end. all should be in constant time.

Round 2: 

  1. Deserialize and serialize binary tree.
  2. Chess game design(LLD).
  3. Some questions on List internal implementation.

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads