
Traveloka

10+ Traveloka Interview Questions and Answers
Q1. System Design Round : Design IRCTC , how does IRCTC reserve a seat? What kind of locking do they use?
IRCTC reserves seats using a complex system of availability checks and booking processes.
IRCTC uses a combination of real-time availability checks and booking processes to reserve seats.
The system checks for availability of seats in real-time and reserves them for a short period of time while the booking process is completed.
IRCTC uses a locking mechanism to ensure that the same seat is not booked by multiple users at the same time.
The locking mechanism is based on a first-co...read more
Q2. Design Makemytrip , how does makemytrip blocks the seat for 15 mins even if the payment doesnot go through?
Makemytrip blocks seat for 15 mins by using a hold on the seat inventory.
Makemytrip uses a hold on the seat inventory to block the seat for 15 mins.
If the payment doesn't go through, the hold is released and the seat becomes available again.
This ensures that the seat is not booked by someone else during the payment process.
The hold time can vary depending on the airline's policy.
Makemytrip also sends reminders to complete the payment before the hold expires.
Q3. Construct Binary Tree from Parent Array Representation
Given an array parent
which represents a binary tree, the parent-child relationship is defined by (PARENT[i], i)
, meaning that the parent of i
is PARENT[i]...read more
Construct a binary tree from parent array representation ensuring specific conditions are met.
Iterate through the parent array to create the binary tree
Handle cases where a node has both left and right children
Ensure left child is smaller than the right child if both exist
If a node has only one child, make it the left child
Q4. Ways To Make Coin Change
Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make the c...read more
The task is to find the total number of ways to make change for a specified value using given denominations.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of ways to make change for each value up to the specified value.
Iterate through the denominations and update the array based on the current denomination.
The final answer will be in the last cell of the array corresponding to the specified value.
Q5. Maximum Path Sum in a Matrix
Given an N*M matrix filled with integer numbers, determine the maximum sum that can be obtained from a path starting from any cell in the first row to any cell in the last row.
You ...read more
Find the maximum sum that can be obtained from a path in a matrix from the first row to the last row.
Use dynamic programming to keep track of the maximum sum at each cell in the matrix.
Consider moving down, diagonally left, and diagonally right to calculate the maximum sum.
Start from the second row and update each cell with the maximum sum from the cell above it and the diagonally adjacent cells.
Continue this process until reaching the last row to find the maximum sum path.
Q6. Partition Equal Subset Sum Problem
Given an array ARR
consisting of 'N' positive integers, determine if it is possible to partition the array into two subsets such that the sum of the elements in both subsets i...read more
The problem is to determine if it is possible to partition an array into two subsets with equal sum.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store if a subset with a particular sum is possible.
Check if it is possible to form a subset with half the total sum of the array.
Q7. Search Element in a Rotated Sorted Array
Given a sorted array that has been rotated, the task is to find the index of a specific element. The array is initially sorted in ascending order and then rotated clockw...read more
Search for an element in a rotated sorted array in O(logN) time complexity.
Implement binary search to find the pivot point where rotation occurs.
Divide the array into two subarrays and perform binary search on the appropriate subarray.
Handle cases where the element lies in the left or right subarray after rotation.
Q8. What are checked and unchecked exceptions?
Checked exceptions are checked at compile-time while unchecked exceptions are not.
Checked exceptions are those that are checked at compile-time and must be handled by the programmer.
Unchecked exceptions are those that are not checked at compile-time and can be handled or not handled by the programmer.
Checked exceptions are subclasses of Exception class while unchecked exceptions are subclasses of RuntimeException class.
Examples of checked exceptions include IOException, Class...read more
Q9. Longest Increasing Subsequence Problem Statement
Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This subse...read more
Find the length of the longest strictly increasing subsequence in an array of integers.
Use dynamic programming to solve this problem efficiently.
Initialize an array to store the length of the longest increasing subsequence ending at each index.
Iterate through the array and update the length of the longest increasing subsequence for each element.
Return the maximum value in the array as the length of the longest increasing subsequence.
Q10. Pros and cons of in-memory database , and distributed database
Comparison of in-memory and distributed databases
In-memory databases are faster due to data being stored in RAM
Distributed databases offer better scalability and fault tolerance
In-memory databases are limited by available RAM
Distributed databases require more complex setup and maintenance
In-memory databases are suitable for real-time applications
Distributed databases are suitable for large-scale applications with high availability requirements
Q11. General security concepts in manual code review
Manual code review involves analyzing code for security vulnerabilities using general security concepts.
Identifying potential security vulnerabilities in the code
Checking for input validation to prevent injection attacks
Reviewing authentication and authorization mechanisms
Ensuring secure coding practices are followed
Looking for sensitive data exposure
Q12. Design Twitter timeline
Design Twitter timeline to display tweets in chronological order
Use a database to store tweets with timestamps
Implement a sorting algorithm to display tweets in chronological order
Include features like retweets, likes, and replies
Allow users to filter timeline based on hashtags or users they follow
More about working at Traveloka

Interview Process at Traveloka

Top Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

