agoda logo
Agoda· Senior Software Engineer

Senior Software Engineer

Posted
29 Apr 2025
474 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.

How it went

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

Questions asked (2)

  1. 01

    Minimum Changes for Non-Adjacent Same Characters

    Data Structures & Algorithms · Medium

    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.

  2. 02

    Optimal Product Discounts

    Data Structures & Algorithms · Medium

    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.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Agoda recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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