Recently interviewed with Agoda for Staff Software Engineer role. Could not clear the system design/platform round. Sharing the questions and discussion topics for others preparing for senior backend/platform roles.
Round 1 — Coding Round (60 mins)
Question 1 — Simple Chemical Formula Evaluation
Write a function:
calculateWeight(String formula)
Requirements:
-
Supported elements:
- C → 12
- H → 1
- O → 8
-
No parentheses
-
Single-digit multipliers only
Example:
Input:
CH4
Output:
16
Explanation:
C = 12
H4 = 1 × 4 = 4
Total = 16
Question 2 — Complex Chemical Formula Evaluation
Enhancement over previous problem:
- Nested parentheses supported
- Multipliers after parentheses apply to entire group
Examples:
Input:
H(CH4)2
Output:
33
Input:
((CH4))
Output:
16
Main concepts:
- Stack
- Parsing
- Recursive/group evaluation
Round 2 — Platform/System Design Round (60 mins)
Architecture Problem
Scenario:
A booking platform needs to expose APIs for external suppliers to fetch booking information.
Requirements:
-
Support 10–20 suppliers
-
Suppliers fetch bookings using different filters:
- last 5 minutes
- last 2 hours
- last 1 day
- next 7 days check-ins
- next 30 days check-ins
-
Peak traffic:
- ~100 requests/minute
Existing proposal from team:
- External Booking API calls internal Booking API
- New endpoint fetches bookings by supplier ID and date range
Main discussion areas:
- Why external APIs should not directly hit core booking service
- Read replicas vs OLTP DB
- CDC/event streaming
- Pagination and cursor-based APIs
- Incremental sync tokens
- Rate limiting/throttling
- Caching strategy
- Security/authentication
- Supplier isolation
Architecture topics interviewer focused on:
- Scalability
- Loose coupling
- External API design
- Data synchronization
- Production readiness
Code Review Discussion
Second part of round involved reviewing Java code for supplier booking query API.
Focus areas:
- Clean code principles
- Single Responsibility Principle
- Dependency Injection
- Removing duplicate cache logic
- Enum-based behavior encapsulation
- Validation cleanup
- Exception handling
- Logging practices
- Cache key design
- Separation of mapper responsibilities
Interview was heavily focused on:
- Backend architecture thinking
- Maintainability
- Real-world production systems
- Senior/staff-level engineering judgment
Hope this helps others preparing for Agoda platform/backend interviews.


