Yatra.com interview questions

103 questions from 11 candidate reports · 2013 to 2023

Online test → Technical·80% entry level

DSA

Showing 36 of 65 reported in this area

Rotate a matrix by 90 degrees clockwise.
asked oncemediumPractice this →
Perform spiral traversal of a binary tree.
asked oncemediumPractice this →
Reverse nodes of a linked list in groups of size K.
asked oncemediumPractice this →
Given a binary tree, convert it into a right-skewed tree.
asked oncemediumPractice this →
Rotate a 2D matrix by 90 degrees without using extra space.
asked oncemediumPractice this →
How do you check if a binary tree is a Binary Search Tree (BST)?
asked oncemediumPractice this →
Given a string like "aaabbbccc", convert it in-place to "a3b3c3".
asked oncemediumPractice this →
Check whether a given binary tree is a Binary Search Tree (BST) or not.
asked oncemediumPractice this →
Given a binary tree, check whether all leaf nodes are at the same level.
asked oncemediumPractice this →
Given an array, find if there exists a triplet whose sum equals a given number.
asked oncemediumPractice this →
Design a stack that supports finding the maximum element (findMax) in O(1) time.
asked oncemediumPractice this →
Find all words in a text that match a given pattern using an efficient algorithm.
asked oncemediumPractice this →
Given three sorted arrays, find the elements that are common in all three arrays.
asked oncemediumPractice this →
Given a string, print all substrings that start with a vowel and end with a consonant.
asked oncemediumPractice this →
In a binary tree, find all left-facing elements using recursion and without recursion.
asked oncemediumPractice this →
Given a 2D array that is sorted both horizontally and vertically, find a given element.
asked oncemediumPractice this →
For each element in an array, count how many previously appeared elements are smaller than it.
asked oncemediumPractice this →
Check whether a given linked list is a palindrome. Write optimized code handling all edge cases.
asked oncemediumPractice this →
Given a group of people, find the celebrity if one exists using the celebrity problem constraints.
asked oncemediumPractice this →
Given a string, return all possible subsequences that start with a vowel and end with a consonant.
asked oncemediumPractice this →
Explain an algorithm for level order traversal of a binary search tree without using a queue data structure.
asked oncemediumPractice this →
Given an integer array and a value k, count the number of contiguous subarrays whose product is less than k.
asked oncemediumPractice this →
Given an unsorted array, print all pairs with a given sum. Modify the solution to avoid printing duplicate pairs.
asked oncemediumPractice this →
Check whether two strings are anagrams of each other. How would the approach change if the strings are very large?
asked oncemediumPractice this →
Find the vertical sum of nodes present in the same vertical line in a binary tree and print sums from left to right.
asked oncemediumPractice this →
Given a file containing characters (from the full ASCII set), design an algorithm to check whether the parentheses in the file are balanced.
asked oncemediumPractice this →
Given an array containing both positive and negative numbers, find three numbers whose sum is equal to a given value x in less than O(n^3) time.
asked oncemediumPractice this →
Given two strings, return the minimum number of manipulations required so that both strings have identical characters (i.e., make them anagrams).
asked oncemediumPractice this →
Given an array of integers, find the maximum size of a subset that forms consecutive numbers (e.g., input: [4,5,6,13] → output: 3 for subset {4,5,6}).
asked oncemediumPractice this →
Birthday problem: Given an array of ages, distribute chocolates such that any friend older than an adjacent neighbor gets more chocolates; compute chocolates for each and the total.
asked oncemediumPractice this →
Given a binary matrix where each row contains 0s and 1s sorted, find the index of the row with the maximum number of 1s. Follow-up: some rows are sorted in increasing order and some in decreasing order.
asked oncemediumPractice this →
Given two arrays: one of size n+m containing only m elements (rest are empty slots) and another of size n containing n elements, design an algorithm to merge the smaller array into the larger one such that the larger array remains sorted. Provide three different algorithms.
asked oncemediumPractice this →
Reverse the elements of a stack without using another stack, queue, or array.
asked oncehardPractice this →
Clone a linked list in which each node has a random pointer in addition to the next pointer.
asked oncehardPractice this →
Given a string, find all palindromic substrings and return the maximum product of the lengths of two palindromic substrings.
asked oncehardPractice this →
Given a 2D matrix containing values 0 (blocked), 1 (open path), and 2 (open path with cheese), Tom starts at (0,0) and Jerry’s location is given. Find an optimal path for Tom to collect all cheese and then catch Jerry.
asked oncehardPractice this →

CS fundamentals

Showing 17 of 37 reported in this area

Implement your own hash map.
asked oncemediumPractice this →
Explain dynamic dispatch and virtual dispatch.
asked oncemediumPractice this →
Operating Systems concepts and theory questions.
asked oncemediumPractice this →
What is Core Data and how does it work internally?
asked oncemediumPractice this →
What are Generics and Any in Swift? Explain their use cases.
asked oncemediumPractice this →
Design a class diagram for a Training and Placement Cell system.
asked oncemediumPractice this →
What is the difference between layoutSubviews and layoutIfNeeded in iOS?
asked oncemediumPractice this →
Compare MVVM and VIPER architectures in iOS. Which one is better and why?
asked oncemediumPractice this →
Design database tables to retrieve all employees working under a given manager.
asked oncemediumPractice this →
Explain the differences between Objective-C and Swift, including why Swift is faster.
asked oncemediumPractice this →
Given a table (EmpID, Salary), write a generic SQL query to get the nth highest salary.
asked oncemediumPractice this →
Find the inorder traversal of a binary tree when preorder and postorder traversals are given.
asked oncemediumPractice this →
In Objective-C, can we assign any type of object to any type of variable? If yes, how can this be restricted?
asked oncemediumPractice this →
Explain the differences between class and struct in Swift, including where they are created and stored in memory.
asked oncemediumPractice this →
If a struct has a class property, where is the object stored in memory? And vice versa if a class has a struct property?
asked oncemediumPractice this →
How would you apply Auto Layout constraints if there are three labels in a cell, arranged horizontally and vertically, and each can grow to multiple lines?
asked oncemediumPractice this →
Explain JSP, Servlets, and Java concepts with emphasis on memory-level behavior.
asked oncehardPractice this →

System design

4 questions reported in this area

Design an elevator system.
asked oncemediumPractice this →
How would you handle pagination in an iOS app consuming APIs?
asked oncemediumPractice this →
How would you design offline support and offline views in an iOS app?
asked oncemediumPractice this →
Implement an iOS assignment to display a list of objects fetched from an API.
asked oncemediumPractice this →

Behavioural

3 questions reported in this area

What will you do if you have a conflict with your manager?
asked oncemediumPractice this →
If your team lead has provided one design and you have created another, how will you persuade the team to follow your design?
asked oncemediumPractice this →
Describe how you would handle a situation where you have a different point of view than your manager.

Showing 60 of 103 questions. Ranked by how often the same question came back across reports.

Practise a Yatra.com-style interview

A spoken interview built from these questions, scored when you finish; the report is yours.

Start practising

Common questions

What questions does Yatra.com ask?

Candidate interview reports most often cover DSA (59%) and CS fundamentals (34%).

How many rounds does Yatra.com interview have?

Candidate interview reports show an average of 3.5 rounds per experience, with a typical sequence of Online test → Technical. Individual interview paths can vary.

Is the Yatra.com interview hard?

Among questions with a reported difficulty, the mix is easy 43%, medium 52%, hard 5%.

Keep reading