Panda Guru LogoPanda
Guru

META | E4 | PHONE SCREEN | US

Round 1

Questions:

  1. Find average of each sliding window. Given an input array of n elements and a sliding window of size k, find the average of each sliding window.

    • Input: [1,2,3,4,5,6,7,8,9]
    • k: 7
    • Output: [4.0, 5.0, 6.0]
  2. Minimum Remove to Make Valid Parentheses

Candidate's Approach

For the first question, I was able to solve it optimally in both time and space. For the second question, I initially solved it using a stack. However, when the interviewer asked me to solve it without using a stack, I explained that it wouldn't make a difference in space complexity and briefly mentioned my approach.

Interviewer's Feedback

No feedback provided.