Yatra Online, Inc is the parent company of Yatra Online Limited. which is based in Gurugram, India, and is India’s leading Corporate Travel services provider with over 700+ Corporate customers, and one of India’s leading online travel companies and operates the website Yatra.com. The company provides information, pricing, availability, and booking facility for domestic and international air travel, domestic and international hotel bookings, holiday packages, buses, trains, in-city activities, inter-city, and point-to-point cabs, homestays, and cruises. As a leading platform of accommodation options, Yatra provides real-time bookings for more than 103,000 hotels in India and over 1,500,000 hotels around the world.

It has got a 3.5* rating on Glassdoor and is considered one of the best product-based companies. It is highly regarded for its work-life balance.

They provide good training as well which will be beneficial in future too. You can practice the below Yatra Interview Questions for the interview. We have collected past frequently asked Yatra Interview Questions for your reference.

Categories of Questions

## Yatra Array Questions

**Question 1. First element occurring k times in an array** We have given a number ‘k’ and an integer array. The problem “First element occurring k times in an array” says to find out the first element in the array which occurs exactly k times in an array. If there is no element in the array which occurs k times ...

**Question 2. Find Index of Closing Bracket for a Given Opening Bracket in an Expression** Problem Statement Given a string s of length/size n and an integer value representing the index of an opening square bracket. Find index of closing bracket for a given opening bracket in an expression. Example s = "[ABC[23]][89]" index = 0 8 s = "[C-[D]]" index = 3 5 s ...

**Question 3. Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’** Problem Statement The problem ” Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’ ” states that you have an “n” sized array containing integers. The numbers in the array are in a range of 0 to n-1. The problem statement asks to rearrange the array in ...

**Question 4. Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest** Problem Statement Suppose you have an integer array. The problem “Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest, ..” asks to rearrange the array in such a way that the smallest number comes first and then the largest number, then second smallest and then the second ...

**Question 5. Sort 0s 1s and 2s in an Array** Problem Statement Given an array containing N elements where elements of the array are 0,1 or 2. Sort or Segregate 0s 1s and 2s in an array. Arrange all zeros in the first half, all ones in the second half and all twos in the third half. Example Input 22 ...

## Yatra String Questions

**Question 6. Find Index of Closing Bracket for a Given Opening Bracket in an Expression** Problem Statement Given a string s of length/size n and an integer value representing the index of an opening square bracket. Find index of closing bracket for a given opening bracket in an expression. Example s = "[ABC[23]][89]" index = 0 8 s = "[C-[D]]" index = 3 5 s ...

**Question 7. Check if Two Expressions With Brackets are Same** Given two strings s1 and s2 representing expressions containing addition operator, subtraction operator, lowercase alphabets, and parenthesis. Check if two expressions with brackets are the same. Example Input s1 = “-(a+b+c)” s2 = “-a-b-c” Output Yes Input s1 = “a-b-(c-d)” s2 = “a-b-c-d” Output No Algorithm to Check if Two ...

**Question 8. Check for Balanced Parentheses in an Expression** Given a string s of length n. Check whether there is a closing parenthesis for every opening parentheses i.e. if all the parentheses are balanced. In other words, we can also say that, if we have a ‘}’, ‘)’ and ‘]’ for every ‘{‘, ‘(‘ and ‘[‘ respectively, the expression ...

**Question 9. Balanced Expression with Replacement** In Balanced Expression with Replacement problem we have given a string s containing parenthesis i.e. ‘(‘, ‘)’, ‘[‘, ‘]’, ‘{‘, ‘}’. The string also contains x at some places as a replacement of parenthesis. Check if the string can be converted into an expression with valid parenthesis after replacing all ...

## Yatra Tree Questions

**Question 10. Iterative Method to find Height of Binary Tree** Problem Statement The problem “Iterative Method to find Height of Binary Tree” states that you are given a binary tree, find the height of the tree using the iterative method. Examples Input 3 Input 4 Algorithm for Iterative Method to find Height of Binary Tree The height of a tree ...

## Yatra Stack Questions

**Question 11. Find Index of Closing Bracket for a Given Opening Bracket in an Expression** Problem Statement Given a string s of length/size n and an integer value representing the index of an opening square bracket. Find index of closing bracket for a given opening bracket in an expression. Example s = "[ABC[23]][89]" index = 0 8 s = "[C-[D]]" index = 3 5 s ...

**Question 12. Check if Two Expressions With Brackets are Same** Given two strings s1 and s2 representing expressions containing addition operator, subtraction operator, lowercase alphabets, and parenthesis. Check if two expressions with brackets are the same. Example Input s1 = “-(a+b+c)” s2 = “-a-b-c” Output Yes Input s1 = “a-b-(c-d)” s2 = “a-b-c-d” Output No Algorithm to Check if Two ...

**Question 13. Check for Balanced Parentheses in an Expression** Given a string s of length n. Check whether there is a closing parenthesis for every opening parentheses i.e. if all the parentheses are balanced. In other words, we can also say that, if we have a ‘}’, ‘)’ and ‘]’ for every ‘{‘, ‘(‘ and ‘[‘ respectively, the expression ...

**Question 14. Balanced Expression with Replacement** In Balanced Expression with Replacement problem we have given a string s containing parenthesis i.e. ‘(‘, ‘)’, ‘[‘, ‘]’, ‘{‘, ‘}’. The string also contains x at some places as a replacement of parenthesis. Check if the string can be converted into an expression with valid parenthesis after replacing all ...

## Yatra Queue Questions

**Question 15. Iterative Method to find Height of Binary Tree** Problem Statement The problem “Iterative Method to find Height of Binary Tree” states that you are given a binary tree, find the height of the tree using the iterative method. Examples Input 3 Input 4 Algorithm for Iterative Method to find Height of Binary Tree The height of a tree ...

## Yatra Matrix Questions

**Question 16. Find distinct elements common to all rows of a matrix** Problem Statement We are given a matrix of all the integers. The problem “Find distinct elements common to all rows of a matrix” asks to find out all the possible distinct elements but common in each of the rows present in a matrix. Example arr[]={ {11, 12, 3, 10}, {11, ...

## Yatra Other Questions

**Question 17. Golomb sequence** Problem Statement The problem “Golomb sequence” states that you are given an input integer n and you need to find all the elements of Golomb sequence until nth element. Example n = 8 1 2 2 3 3 4 4 4 Explanation The first 8 terms of the Golomb sequence ...