Zeta | SDE 2 | 2025

zeta logo
zeta
SDE 2Rejected
October 16, 202519 reads

Summary

I interviewed for an SDE 2 position at Zeta where the first round focused on Data Structures and Algorithms. I was presented with a unique problem involving particle selection for a stable atom and went through several follow-up optimizations, though I couldn't reach the interviewer's optimal solution, indicating a likely rejection.

Full Experience

My first round at Zeta for the SDE 2 role began with an introduction and a brief discussion about my current project. Following that, the interviewer presented a specific Data Structures and Algorithms problem. The task involved determining the number of ways to select three particles (electrons 'e' and protons 'p') from a given array to form a stable atom, maintaining index order. A stable atom was defined as one with no two consecutive identical particles and exactly three total particles.

Initially, I discussed a recursive approach. During our discussion, the interviewer hinted that a non-recursive solution was possible, so I then proposed a simpler approach using a for loop.

The first follow-up asked to calculate all consecutive and non-consecutive ways. I first offered an O(n^3) solution, then optimized it to O(n^2), and wrote the corresponding code.

For the second follow-up, the challenge was to achieve an O(n) solution. I provided an approach using hashmaps and counters, which utilized O(n) extra space.

We ran out of time after this. As we wrapped up, the interviewer mentioned an O(n) time and O(1) space solution that I hadn't come up with. Given this, I'm not expecting to receive a call for further rounds.

Interview Questions (1)

Q1
Select Three Particles for a Stable Atom
Data Structures & AlgorithmsHard

You are given an array representing the arrangement of electrons (e) and protons (p) within an atom. Your task is to determine the number of ways to select three particles from this array to form a stable atom. (index order should be maintained)

Definition of a Stable Atom:

For the purpose of this problem, a stable atom is defined as one in which no two consecutive particles (electrons or protons) are identical, and the total number of particles selected is exactly three.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!