Add office photos
Traveloka logo
Employer?
Claim Account for FREE

Traveloka

4.1
based on 12 Reviews
Filter interviews by
Software Developer
Fresher
Clear (1)

Traveloka Software Developer Interview Questions and Answers

Updated 5 Feb 2024

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

Ans.

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

Add your answer
right arrow

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

Ans.

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.

Add your answer
right arrow
Traveloka Software Developer Interview Questions and Answers for Freshers
illustration image

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

Ans.

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.

Add your answer
right arrow

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

Ans.

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.

Add your answer
right arrow
Discover Traveloka interview dos and don'ts from real experiences

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

Ans.

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.

Add your answer
right arrow

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

Ans.

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.

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

Samsung Logo
3.9
 • 81 Interview Questions
Intuit Logo
3.5
 • 46 Interview Questions
Oracle Logo
3.7
 • 45 Interview Questions
Lowe's Logo
4.1
 • 10 Interview Questions
View all
Recently Viewed
INTERVIEWS
Iol Chemicals & Pharmaceuticals
No Interviews
INTERVIEWS
Iol Chemicals & Pharmaceuticals
No Interviews
JOBS
Iol Chemicals & Pharmaceuticals
No Jobs
SALARIES
Iol Chemicals & Pharmaceuticals
SALARIES
Aarti Industries
INTERVIEWS
Indian Oil Corporation
No Interviews
REVIEWS
Aarti Industries
No Reviews
INTERVIEWS
Traveloka
No Interviews
LIST OF COMPANIES
Iol Chemicals & Pharmaceuticals
Overview
REVIEWS
Think Gas Ludhiana
No Reviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter