Yatra.com interview questions
Online test → Technical·80% entry level
DSA
Showing 36 of 65 reported in this area
Rotate a matrix by 90 degrees clockwise.
Perform spiral traversal of a binary tree.
Reverse nodes of a linked list in groups of size K.
Given a binary tree, convert it into a right-skewed tree.
Rotate a 2D matrix by 90 degrees without using extra space.
How do you check if a binary tree is a Binary Search Tree (BST)?
Given a string like "aaabbbccc", convert it in-place to "a3b3c3".
Check whether a given binary tree is a Binary Search Tree (BST) or not.
Given a binary tree, check whether all leaf nodes are at the same level.
Given an array, find if there exists a triplet whose sum equals a given number.
Design a stack that supports finding the maximum element (findMax) in O(1) time.
Find all words in a text that match a given pattern using an efficient algorithm.
Given three sorted arrays, find the elements that are common in all three arrays.
Given a string, print all substrings that start with a vowel and end with a consonant.
In a binary tree, find all left-facing elements using recursion and without recursion.
Given a 2D array that is sorted both horizontally and vertically, find a given element.
For each element in an array, count how many previously appeared elements are smaller than it.
Check whether a given linked list is a palindrome. Write optimized code handling all edge cases.
Given a group of people, find the celebrity if one exists using the celebrity problem constraints.
Given a string, return all possible subsequences that start with a vowel and end with a consonant.
Explain an algorithm for level order traversal of a binary search tree without using a queue data structure.
Given an integer array and a value k, count the number of contiguous subarrays whose product is less than k.
Given an unsorted array, print all pairs with a given sum. Modify the solution to avoid printing duplicate pairs.
Check whether two strings are anagrams of each other. How would the approach change if the strings are very large?
Find the vertical sum of nodes present in the same vertical line in a binary tree and print sums from left to right.
Given a file containing characters (from the full ASCII set), design an algorithm to check whether the parentheses in the file are balanced.
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.
Given two strings, return the minimum number of manipulations required so that both strings have identical characters (i.e., make them anagrams).
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}).
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.
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.
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.
Reverse the elements of a stack without using another stack, queue, or array.
Clone a linked list in which each node has a random pointer in addition to the next pointer.
Given a string, find all palindromic substrings and return the maximum product of the lengths of two palindromic substrings.
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.
CS fundamentals
Showing 17 of 37 reported in this area
Implement your own hash map.
Explain dynamic dispatch and virtual dispatch.
Operating Systems concepts and theory questions.
What is Core Data and how does it work internally?
What are Generics and Any in Swift? Explain their use cases.
Design a class diagram for a Training and Placement Cell system.
What is the difference between layoutSubviews and layoutIfNeeded in iOS?
Compare MVVM and VIPER architectures in iOS. Which one is better and why?
Design database tables to retrieve all employees working under a given manager.
Explain the differences between Objective-C and Swift, including why Swift is faster.
Given a table (EmpID, Salary), write a generic SQL query to get the nth highest salary.
Find the inorder traversal of a binary tree when preorder and postorder traversals are given.
In Objective-C, can we assign any type of object to any type of variable? If yes, how can this be restricted?
Explain the differences between class and struct in Swift, including where they are created and stored in memory.
If a struct has a class property, where is the object stored in memory? And vice versa if a class has a struct property?
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?
Explain JSP, Servlets, and Java concepts with emphasis on memory-level behavior.
System design
4 questions reported in this area
Design an elevator system.
How would you handle pagination in an iOS app consuming APIs?
How would you design offline support and offline views in an iOS app?
Implement an iOS assignment to display a list of objects fetched from an API.
Behavioural
3 questions reported in this area
What will you do if you have a conflict with your manager?
If your team lead has provided one design and you have created another, how will you persuade the team to follow your design?
Describe how you would handle a situation where you have a different point of view than your manager.
asked oncePractice this →
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 practisingCommon 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%.