Panda Guru LogoPanda
Guru

Meta Phone Screen | Product | E5 | Pass

Round 1

Questions:

  1. Return the sum of distinct characters

    • Input: 3, 1, 2, 1, 2
    • Output: 6
      Proposed solution using a set and was asked "How would you implement a set?"
      This question caught me off guard, and wasn't for actually answering the DSA, but for discussing how an actual set is implemented (hashing, collision handling, etc).
      Asked to find a solution without extra space, provided solution to sort input and coded.
      Missed one edge case the interviewer had to point out that was a bug before moving to the next question.
  2. Basic Calculator II with only + and * operators

    • Coded stack solution before moving on to also code O(1) memory.
    • Interviewer wasn’t confident solution would work on edge cases, so quickly added something not in the Leetcode discussion in the last minute (had coded original, so would have worked).
Candidate's Approach
  • Proposed using a set to return the sum of distinct characters.
  • Implemented a sorting solution to avoid using extra space.
  • Coded a stack solution for the Basic Calculator II problem, aiming for O(1) memory.
Interviewer's Feedback
  • Provided "great feedback" despite missing some edge cases.
  • Emphasized the importance of discussing tradeoffs between multiple solutions.