
Traveloka

Traveloka Software Developer Interview Questions and Answers
Q1. 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
Q2. 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.
Q3. 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.
Q4. 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.
Q5. 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.
Q6. 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.
More about working at Traveloka


Top Software Developer Interview Questions from Similar Companies







Reviews
Interviews
Salaries
Users/Month

