Senior Software Engineer
Anonymous User
2381

Company: Agoda
Role: Senior Software Engineer
Round: Online Coding Interview (First Round)

💻 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

Comments (5)