Agoda Staff Software Level Coding Questions

336
Nov 13, 2026

Hi LeetCoders,
I recently interviewed for the position of Staff Software Enginner at Agoda (Gurugram).

The questions were easy. I am sharing them here so that it can help someone later.

Problem 1 : It was essentially asking that you have an integer array containing 1s and 2s. We need to move all 1s to the start and all 2s to the end. It has to be done in-place.

Soln 1 : We can maintain 2 pointers one for read which always keeps increasing and another write pointer. The write pointer
tracks the position where you should swap if you encounter a 0.

Problem 2: Given an integer array containing 1s and 2s and 3s. We need to move all 1s to the start followed by 2s and then 3s and the end. Again this has to be done in-place.

Soln 2 : This was a variation of https://leetcode.com/problems/sort-colors/description/ .

Hope this would help someone in the future. Keep learning !!!

Comments (3)