Senior Software Engineer

agoda logo
agoda
Senior Software Engineer
April 29, 20252 reads

Summary

I recently completed an online coding interview for a Senior Software Engineer role at Agoda. The round involved two coding questions of easy-to-medium difficulty, both of which I successfully solved using greedy and HashMap approaches.

Full Experience

Online Coding Interview Experience

I recently appeared for the first round of the Agoda Senior Software Engineer hiring process. The round was conducted on the Hackerrank platform and consisted of 2 coding questions, both of easy-to-medium difficulty. The total time was 90 minutes.

Question 1: Strings and Greedy

I was given a list of strings. The task was to return the minimum number of changes required so that no two adjacent characters in any of the strings are the same.

Key Concepts: String manipulation, Greedy algorithm

Approach: I traversed each string and used a greedy strategy to make minimal changes whenever two adjacent characters matched.

Status: ✅ Solved

Question 2: Discounts on Products

Given a list of products where each product could have 0 or more discounts, and discounts had tags and types (e.g., percentage, flat value, etc.). There could be multiple discounts with the same tag but of different types.

The goal was to find the minimum total cost to buy all the products after applying the most optimal combination of discounts.

Key Concepts: HashMap, Math/Greedy

Approach: I used a map to track the best discount for each tag and applied them optimally to each product.

Status: ✅ Solved

Interview Questions (2)

Q1
Minimum Changes for Non-Adjacent Same Characters
Data Structures & AlgorithmsMedium

I was given a list of strings. The task was to return the minimum number of changes required so that no two adjacent characters in any of the strings are the same.

Q2
Optimal Product Discounts
Data Structures & AlgorithmsMedium

Given a list of products where each product could have 0 or more discounts, and discounts had tags and types (e.g., percentage, flat value, etc.). There could be multiple discounts with the same tag but of different types.

The goal was to find the minimum total cost to buy all the products after applying the most optimal combination of discounts.

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!