Paytm SSE Noida Interview experience
Summary
I interviewed for a Senior Software Engineer (SSE) role at Paytm in Noida, completed an online assessment and a virtual interview where I was given a custom circular particle collision problem.
Full Experience
Hey
I got interviewed for SSE role in Paytm Noida.
Round 1 -> OA
Test comprising of MCQ's and DSA problems currently i don't remember problems exactly but easy to solve.
Round 2 -> Virtual Interview
The interviewer was a senior engineer in paytm bangalore.
Problem
-------
You are given an integer array arr representing particles moving on a circular track.
- Each element represents a particle.
- The absolute value represents the mass of the particle.
- The sign represents the direction:
- Positive (+) → clockwise
- Negative (-) → anticlockwise
- No particle has zero mass.
When two particles moving in opposite directions meet:
- The particle with smaller mass is destroyed.
- The particle with larger mass survives and its new mass becomes the sum of both masses.
- The direction of the resulting particle is the same as the heavier particle.
- If both have equal mass → both are destroyed.
Input: [2, 4, 6, 8, -3, -5, -7, -9]
Output: [2, 4, 6, 32]
Input: [-2, 4, 6, 23, 9]
Output: [11, 4, 6, 23]
You can think it as of Asteroid collision with circular and mass addition constraint.
I give brute approach by traversing array multiple time till no collisions occur then he said to optimize it i tried using stack but i think he had some Double linked list linear approach in his mind so he neglected the stack approach.
I am not able to understand his expectations because linear might not be possible in this case.
Also i was not able to find this problem anywhere so that i can understand waht is correct approach.
Seems like he customly build this problem, i think the problem was good but to be realistic for interview there should be some proper solution of it.
Initially mentioned that there will be couple of DSA related problems in the round but in last he mentioned that this is hard problem and can took easily one hour.
If anyone knows what can be the correct approach or can found similar problem on internet, do let me know.
Interview Questions (1)
Circular Particle Collision with Mass
You are given an integer array arr representing particles moving on a circular track.
- Each element represents a particle.
- The absolute value represents the mass of the particle.
- The sign represents the direction:
- Positive (+) → clockwise
- Negative (-) → anticlockwise
- No particle has zero mass.
When two particles moving in opposite directions meet:
- The particle with smaller mass is destroyed.
- The particle with larger mass survives and its new mass becomes the sum of both masses.
- The direction of the resulting particle is the same as the heavier particle.
- If both have equal mass → both are destroyed.
Example
Input: [2, 4, 6, 8, -3, -5, -7, -9]
Output: [2, 4, 6, 32]
Input: [-2, 4, 6, 23, 9]
Output: [11, 4, 6, 23]
The problem is similar to the classic "asteroid collision" but on a circular track and with mass addition after collisions.