Flexport OA
Anonymous User
1018

There were 4 problems to be solved in 120 mins. 3 DSA and 1 REST API based

Problem-1
Given an array of n integers, we define score for a pair of indices i, j as min(a[i], a[j]) * abs(i - j). Find max possible score. n <= 10^5

Problem-2
Given some intervals with start day and end day and some profit associated with each interval, we need to find max possible profit that we can obtain in one day on choosing atmost k of these intervals.
k, n <= 10^3, profit <= 10^9

Problem-3
Given a graph with n nodes and n egdes and it is given that there is a cycle in the graph. We need to find the shortest distance from every node to the closest node which belongs to the cycle. Graph is connected.
n <= 10^3

Problem-4
It was a REST API based. Just had to invoke a given API and do some processing to obtain the final result. It wasn't a difficult problem if you have some experience doing this kind of stuff.

Managed to solve all 4 with around 45 mins remaining. Will update about further rounds if I get a call for interview

Comments (5)