Panda Guru LogoPanda
Guru

Meesho | SDE1 Lateral Tech Hiring | 17 Nov | Reject

Round 1

Questions:

  1. Given two arrays arr1 and arr2, you can swap 2 elements of the array any number of times. Find the max possible sum of i*(arr2[i]-arr1[i]) for 1 <= i <= n.

  2. You are given a supercomputer with multiple processors arranged sequentially in a row from 1 to n. For the ith processor, the efficiency of the ith processor is no_adjacent[i], one_adjacent[i], or both_adjacent[i] when neither, one, or both adjacent processors is deployed before processor i. The 1st and nth processors can only have one adjacent. Find the max possible sum of efficiencies amongst all possible orders of deployment.

  3. CountGoodSubsequences. Conditions for good:

    • All elements in the sequence are unique.
    • If the minimum in the sequence is a and the maximum is b, then all numbers in the range [a, b] should be present in the sequence.
Candidate's Approach

The candidate reported feeling hopeless after the test, managing to pass only 1 test case in one question and 2 test cases in another. Specific approaches to the questions were not detailed.

Interviewer's Feedback

No feedback provided.