Add office photos
Engaged Employer

MakeMyTrip

3.7
based on 855 Reviews
Filter interviews by

100+ Westin Interview Questions and Answers

Updated 26 Dec 2024
Popular Designations

Q1. Tower of Hanoi Problem Statement

You have three rods numbered from 1 to 3, and 'N' disks initially stacked on the first rod in increasing order of their sizes (largest disk at the bottom). Your task is to move ...read more

Ans.

Tower of Hanoi problem involves moving 'N' disks from one rod to another following specific rules in less than 2^N moves.

  • Implement a recursive function to move disks from one rod to another while following the rules.

  • Use the concept of recursion and backtracking to solve the Tower of Hanoi problem efficiently.

  • Maintain a count of moves and track the movement of disks in a 2-D array/list.

  • Ensure that larger disks are not placed on top of smaller disks during the movement.

  • The solu...read more

Add your answer

Q2. Minimum Jumps Problem Statement

Bob and his wife are in the famous 'Arcade' mall in the city of Berland. This mall has a unique way of moving between shops using trampolines. Each shop is laid out in a straight...read more

Ans.

Find the minimum number of trampoline jumps Bob needs to make to reach the final shop, or return -1 if it's impossible.

  • Use Breadth First Search (BFS) algorithm to find the minimum number of jumps required.

  • Keep track of the visited shops to avoid revisiting them.

  • If a shop has an Arr value of 0, it is impossible to reach the final shop.

  • Return -1 if the final shop cannot be reached.

Add your answer

Q3. Reverse Linked List Problem Statement

Given a singly linked list of integers, return the head of the reversed linked list.

Example:

Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed linked list: 4 -> 3 -> 2...read more
Ans.

Reverse a singly linked list of integers and return the head of the reversed linked list.

  • Iterate through the linked list and reverse the pointers to point to the previous node.

  • Keep track of the current, previous, and next nodes while reversing the linked list.

  • Update the head of the reversed linked list as the last node encountered during reversal.

Add your answer

Q4. Smallest Window Problem Statement

Given two strings, S and X, your task is to find the smallest substring in S that contains all the characters present in X.

Example:

Input:
S = "abdd", X = "bd"
Output:
"bd"
Ex...read more
Ans.

Find the smallest substring in string S that contains all characters in string X.

  • Iterate through string S and keep track of characters in X found in a window

  • Use two pointers to maintain the window and slide it to find the smallest window

  • Return the smallest window containing all characters in X

Add your answer
Discover Westin interview dos and don'ts from real experiences

Q5. Rat in a Maze Problem Statement

You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N matrix w...read more

Ans.

Find all possible paths for a rat in a maze from start to destination.

  • Use backtracking to explore all possible paths in the maze.

  • Keep track of visited cells to avoid revisiting them.

  • Return paths in alphabetical order as a list of strings.

Add your answer

Q6. Combination Sum Problem Statement

Given an array of distinct positive integers ARR and a non-negative integer 'B', find all unique combinations in the array where the sum is equal to 'B'. Numbers can be chosen ...read more

Ans.

The task is to find all unique combinations in an array where the sum is equal to a given target sum, with elements in non-decreasing order.

  • Use backtracking to generate all possible combinations.

  • Sort the array to ensure elements are in non-decreasing order.

  • Keep track of the current combination and sum while exploring the array.

  • Recursively explore all possible combinations.

  • Return the valid combinations that sum up to the target sum.

Add your answer
Are these interview questions helpful?

Q7. Cycle Detection in a Singly Linked List

Determine if a given singly linked list of integers forms a cycle or not.

A cycle in a linked list occurs when a node's next points back to a previous node in the list. T...read more

Ans.

Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.

  • Traverse the linked list using two pointers, one moving at double the speed of the other.

  • If the two pointers meet at any point, there is a cycle in the linked list.

  • Use Floyd's Cycle Detection Algorithm for O(N) time complexity and O(1) space complexity.

Add your answer

Q8. Minimum Steps for a Knight to Reach Target

Given a square chessboard of size 'N x N', determine the minimum number of moves a Knight requires to reach a specified target position from its initial position.

Expl...read more

Ans.

Calculate the minimum number of moves a Knight needs to reach a target position on a chessboard.

  • Implement a function that takes knight's starting position, target position, and chessboard size as input

  • Use breadth-first search algorithm to find the shortest path for the Knight

  • Consider all possible 8 movements of the Knight on the chessboard

  • Return the minimum number of moves required for the Knight to reach the target position

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Minimum Operations Problem Statement

You are given an array 'ARR' of size 'N' consisting of positive integers. Your task is to determine the minimum number of operations required to make all elements in the arr...read more

Ans.

Minimum number of operations to make all elements in an array equal by performing addition, subtraction, multiplication, or division.

  • Iterate through the array to find the maximum and minimum elements.

  • Calculate the difference between the maximum and minimum elements.

  • The minimum number of operations needed is the difference between the maximum and minimum elements.

Add your answer

Q10. find out the subset of an array of continuous positive numbers from a larger array whose sum of of the elements is larger in comparision to other subset. eg: {1,2 5 -7, 2 5} .The two subarrays are {1,2,5} {2,5}...

read more
Ans.

Find the subset of an array with the largest sum of continuous positive numbers.

  • Iterate through the array and keep track of the current sum and the maximum sum seen so far.

  • If the current element is positive, add it to the current sum. If it is negative, reset the current sum to 0.

  • Also keep track of the start and end indices of the maximum sum subset.

  • Return the subset using the start and end indices.

Add your answer

Q11. Maximum Distance Problem Statement

Given an integer array 'A' of size N, your task is to find the maximum value of j - i, with the restriction that A[i] <= A[j], where 'i' and 'j' are indices of the array.

Inpu...read more

Ans.

Find the maximum distance between two elements in an array where the element at the first index is less than or equal to the element at the second index.

  • Iterate through the array and keep track of the minimum element encountered so far along with its index.

  • Calculate the maximum distance by subtracting the current index from the index of the minimum element.

  • Update the maximum distance if a greater distance is found while iterating.

  • Return the maximum distance calculated.

Add your answer

Q12. Next Greater Number Problem Statement

Given a string S which represents a number, determine the smallest number strictly greater than the original number composed of the same digits. Each digit's frequency from...read more

Ans.

The task is to find the smallest number greater than the given number with the same set of digits.

  • Iterate from right to left to find the first digit that can be swapped with a larger digit to make the number greater.

  • Swap this digit with the smallest digit to its right that is larger than it.

  • Sort all digits to the right of the swapped digit in ascending order to get the smallest number.

  • If no such number exists, return -1.

  • Example: For input '56789', output '56798'.

Add your answer

Q13. Make Array Elements Equal Problem Statement

Given an integer array, your objective is to change all elements to the same value, minimizing the cost. The cost of changing an element from x to y is defined as |x ...read more

Ans.

Find the minimum cost to make all elements of an array equal by changing them to the same value.

  • Calculate the median of the array and find the sum of absolute differences between each element and the median.

  • Sort the array and find the median element, then calculate the sum of absolute differences between each element and the median.

  • If the array has an even number of elements, consider the average of the two middle elements as the median.

Add your answer

Q14. Count Inversions Problem Statement

Given an integer array ARR of size N, your task is to find the total number of inversions that exist in the array.

An inversion is defined for a pair of integers in the array ...read more

Ans.

Count the total number of inversions in an integer array.

  • Iterate through the array and for each pair of elements, check if the inversion condition is met.

  • Use a nested loop to compare each pair of elements efficiently.

  • Keep a count of the inversions found and return the total count at the end.

Add your answer

Q15. Smallest Integer Not Representable as Subset Sum

Given a non-decreasing sorted array ARR of N positive numbers, determine the smallest positive integer that cannot be expressed as the sum of elements from any p...read more

Ans.

Find the smallest positive integer that cannot be expressed as the sum of elements from any proper subset of a non-decreasing sorted array of positive numbers.

  • Start with the smallest possible integer that cannot be represented, which is 1.

  • Iterate through the array and update the smallest integer that cannot be represented.

  • If the current element is greater than the smallest integer that cannot be represented, return that integer.

  • If all elements in the array can be represented,...read more

Add your answer

Q16. Maximum Consecutive Ones Problem Statement

Given a binary array 'ARR' of size 'N', your task is to determine the maximum length of a sequence consisting solely of 1’s that can be obtained by converting at most ...read more

Ans.

Find the maximum length of a sequence of 1's by converting at most K zeroes into ones in a binary array.

  • Iterate through the array and keep track of the current window of 1's and zeroes.

  • Use a sliding window approach to find the maximum length of the sequence.

  • Update the window by flipping zeroes to ones within the limit of K flips.

  • Return the maximum length of the sequence obtained.

Add your answer

Q17. Number of Islands II Problem Statement

You have a 2D grid of dimensions 'N' rows by 'M' columns, initially filled with water. You are given 'Q' queries, where each query contains two integers 'X' and 'Y'. Durin...read more

Ans.

The task is to determine the number of islands present on a 2D grid after each query of converting water to land.

  • Create a function that takes the grid dimensions, number of queries, and query coordinates as input.

  • For each query, convert the water at the given coordinates to land and then count the number of islands on the grid.

  • Use depth-first search (DFS) or breadth-first search (BFS) to identify connected land cells forming islands.

  • Return the number of islands after each que...read more

Add your answer

Q18. Shortest Path in a Binary Matrix Problem Statement

Given a binary matrix of size N * M where each element is either 0 or 1, find the shortest path from a source cell to a destination cell, consisting only of 1s...read more

Ans.

Find the shortest path in a binary matrix from a source cell to a destination cell consisting only of 1s.

  • Use Breadth First Search (BFS) algorithm to find the shortest path.

  • Keep track of visited cells to avoid revisiting them.

  • Calculate the path length by counting the number of 1s in the path.

  • Handle edge cases such as invalid inputs and unreachable destination.

Add your answer

Q19. Square Root with Decimal Precision Problem Statement

You are provided with two integers, 'N' and 'D'. Your objective is to determine the square root of the number 'N' with a precision up to 'D' decimal places. ...read more

Ans.

Implement a function to find the square root of a number with a given precision.

  • Create a function that takes 'N' and 'D' as input parameters

  • Use a mathematical algorithm like Newton's method to approximate the square root

  • Iterate until the precision condition is met

  • Return the square root with the required precision

Add your answer

Q20. Reach the Destination Problem Statement

You are given a source point (sx, sy) and a destination point (dx, dy). Determine if it is possible to reach the destination point using only the following valid moves:

    ...read more
Ans.

The problem involves determining if it is possible to reach a destination point from a source point using specified moves.

  • Iterate through each test case and check if destination is reachable from source using specified moves

  • Implement a recursive function to explore all possible paths from source to destination

  • Keep track of visited points to avoid infinite loops

  • Return true if destination is reachable, false otherwise

Add your answer

Q21. Maximum Sum of Products for Array Rotations

You are given an array ARR consisting of N elements. Your task is to determine the maximum value of the summation of i * ARR[i] among all possible rotations of ARR. R...read more

Ans.

Find the maximum sum of products for array rotations.

  • Iterate through all possible rotations of the array and calculate the sum of products for each rotation.

  • Keep track of the maximum sum of products found so far.

  • Return the maximum sum of products obtained.

Add your answer

Q22. Validate Binary Search Tree (BST)

You are given a binary tree with 'N' integer nodes. Your task is to determine whether this binary tree is a Binary Search Tree (BST).

BST Definition:

A Binary Search Tree (BST)...read more

Ans.

Validate if a given binary tree is a Binary Search Tree (BST) or not.

  • Check if the left subtree of a node contains only nodes with data less than the node's data.

  • Check if the right subtree of a node contains only nodes with data greater than the node's data.

  • Ensure that both the left and right subtrees are also binary search trees.

  • Traverse the tree in an inorder manner and check if the elements are in sorted order.

  • Recursively check each node's value against the range of values ...read more

Add your answer

Q23. Longest Duplicate Substring Problem Statement

You are provided with a string 'S'. The task is to determine the length of the longest duplicate substring within this string. Note that duplicate substrings can ov...read more

Ans.

Find the length of the longest duplicate substring in a given string.

  • Iterate through all possible substrings of the input string.

  • Use a rolling hash function to efficiently compare substrings.

  • Store the lengths of duplicate substrings and return the maximum length.

Add your answer

Q24. Sub Sort Problem Statement

You are given an integer array ARR. Determine the length of the shortest contiguous subarray which, when sorted in ascending order, results in the entire array being sorted in ascendi...read more

Ans.

Determine the length of the shortest contiguous subarray that needs to be sorted to make the entire array sorted in ascending order.

  • Iterate from left to right to find the first element out of order.

  • Iterate from right to left to find the last element out of order.

  • Calculate the length of the subarray between the two out of order elements.

Add your answer

Q25. Delete Node in Binary Search Tree Problem Statement

You are provided with a Binary Search Tree (BST) containing 'N' nodes with integer data. Your task is to remove a given node from this BST.

A BST is a binary ...read more

Ans.

Implement a function to delete a node from a Binary Search Tree and return the inorder traversal of the modified BST.

  • Understand the properties of a Binary Search Tree (BST) - left subtree contains nodes with data less than the node, right subtree contains nodes with data greater than the node.

  • Implement a function to delete the given node from the BST while maintaining the BST properties.

  • Perform inorder traversal of the modified BST to get the desired output.

  • Handle cases where...read more

Add your answer

Q26. Pair Sum Problem Statement

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.

Note:

Each pa...read more

Ans.

Given an array of integers and a target sum, find all pairs of elements that add up to the target sum.

  • Use a hashmap to store the difference between the target sum and each element as keys and their indices as values.

  • Iterate through the array and check if the current element's complement exists in the hashmap.

  • Return the pairs of elements that add up to the target sum in sorted order.

Add your answer

Q27. In a normal e-commerce user flow, how will you determine the points at which the drop-off rates are high and what to do about them? (Take any e-commerce website and walk through the steps. You can use A/B Testi...

read more
Ans.

To determine high drop-off rates in e-commerce user flow, use analytics tools and A/B testing to identify and fix issues.

  • Use analytics tools like Google Analytics to track user behavior and identify points of drop-off

  • Conduct A/B testing to experiment with different solutions and determine which is most effective

  • Address issues such as slow page load times, confusing navigation, and lack of trust signals

  • Offer incentives such as free shipping or discounts to encourage users to c...read more

Add your answer

Q28. Determine the Left View of a Binary Tree

You are given a binary tree of integers. Your task is to determine the left view of the binary tree. The left view consists of nodes that are visible when the tree is vi...read more

Ans.

The task is to determine the left view of a binary tree, which consists of nodes visible when viewed from the left side.

  • Traverse the binary tree level by level from left to right, keeping track of the first node encountered at each level.

  • Use a queue to perform level order traversal and keep track of the level number for each node.

  • Store the first node encountered at each level in a result array to get the left view of the binary tree.

Add your answer
Q29. What are the port numbers of protocols such as FTP and SMTP?
Ans.

FTP uses port number 21 and SMTP uses port number 25.

  • FTP uses port 21 for data transfer and port 20 for control information.

  • SMTP uses port 25 for email communication.

  • Understanding port numbers is important for network communication.

Add your answer

Q30. Given an integer array of size n, find the maximum circular subarray sum. A circular array means that the end of the array connects back to the beginning. The solution should consider both the non-circular maxi...

read more
Ans.

Find the maximum circular subarray sum in an integer array.

  • Calculate the non-circular maximum subarray sum using Kadane's algorithm.

  • Calculate the circular maximum subarray sum by subtracting the minimum subarray sum from the total sum.

  • Compare the non-circular and circular maximum subarray sums to get the overall maximum sum.

Add your answer
Q31. Can you explain the concepts of multithreading and semaphore in operating systems?
Ans.

Multithreading allows multiple threads to run concurrently, while semaphores are used to control access to shared resources in a synchronized manner.

  • Multithreading involves running multiple threads within a single process, allowing for parallel execution of tasks.

  • Semaphores are used to control access to shared resources by allowing only a certain number of threads to access the resource at a time.

  • Semaphores can be binary (mutex) or counting, with binary semaphores used for mu...read more

Add your answer
Q32. What are the types of polymorphism in Object-Oriented Programming?
Ans.

Types of polymorphism in OOP include compile-time (method overloading) and runtime (method overriding) polymorphism.

  • Compile-time polymorphism is achieved through method overloading, where multiple methods have the same name but different parameters.

  • Runtime polymorphism is achieved through method overriding, where a subclass provides a specific implementation of a method that is already defined in its superclass.

  • Polymorphism allows objects of different classes to be treated as...read more

Add your answer
Q33. What is the difference between deep copy and shallow copy?
Ans.

Deep copy creates a new object and recursively copies all nested objects, while shallow copy creates a new object and copies only the references to nested objects.

  • Deep copy creates a new object and copies all nested objects, while shallow copy creates a new object and copies only the references to nested objects.

  • In deep copy, changes made to the original object do not affect the copied object, while in shallow copy, changes made to the original object may affect the copied ob...read more

Add your answer

Q34. You are given two strings s1 and s2.Now, find the smallest substring in s1 containing all characters of s2

Ans.

Find smallest substring in s1 containing all characters of s2.

  • Create a hash table of characters in s2

  • Use sliding window technique to find smallest substring in s1

  • Check if all characters in s2 are present in the substring

  • Update the smallest substring if a smaller one is found

Add your answer

Q35. Guess estimate: How many people are there in ISB's cafeteria right now?

Ans.

It is not possible to accurately guess the number of people in ISB's cafeteria without available data.

  • Without available data, it is impossible to estimate the number of people in the cafeteria.

  • The number of people in the cafeteria can vary greatly depending on the time of day and other factors.

  • To provide an accurate estimate, data such as the cafeteria's capacity and current occupancy would be needed.

View 1 answer
Q36. What is the difference between AngularJS and jQuery?
Ans.

AngularJS is a full-fledged MVC framework for building dynamic web applications, while jQuery is a lightweight library for DOM manipulation and event handling.

  • AngularJS is a full-fledged MVC framework, providing features like two-way data binding, dependency injection, and routing.

  • jQuery is a lightweight library primarily used for DOM manipulation and event handling.

  • AngularJS is suitable for building single-page applications, while jQuery is more commonly used for enhancing t...read more

Add your answer

Q37. Design a minimum stack that supports the following operations: push, pop, top, and retrieving the minimum element in constant time.

Ans.

Design a stack that supports push, pop, top, and retrieving minimum element in constant time.

  • Use two stacks - one to store the actual elements and another to store the minimum values encountered so far

  • When pushing an element, check if it is smaller than the current minimum and if so, push it to the minimum stack

  • When popping an element, check if it is the current minimum and if so, pop from the minimum stack as well

  • Top operation can be implemented by returning the top element ...read more

Add your answer

Q38. How ajax works? Difference between angular js and jquery?

Ans.

Ajax is a technique for creating fast and dynamic web pages. AngularJS is a framework for building dynamic web applications, while jQuery is a library for simplifying HTML DOM traversal and manipulation.

  • Ajax stands for Asynchronous JavaScript and XML

  • It allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes

  • AngularJS is a JavaScript framework that extends HTML with new attributes and makes it more responsive to user actions

  • It provid...read more

Add your answer

Q39. What is lazy loading? Advantages and disadvantages of the same?

Ans.

Lazy loading is a technique used to defer the loading of non-critical resources until they are needed.

  • Advantages: faster initial page load, reduced bandwidth usage, improved user experience

  • Disadvantages: increased complexity, potential for slower subsequent page loads, difficulty with SEO

  • Examples: images, videos, and other media files can be loaded only when they are visible on the screen

Add your answer

Q40. Program to find all possible combinations of elements from two sets of arrays such that the sum of elements is equal to one of the elements in the array itself.

Ans.

Program to find all possible combinations of elements from two sets of arrays such that the sum of elements is equal to one of the elements in the array itself.

  • Create two arrays of integers

  • Loop through both arrays and find all possible combinations

  • Check if the sum of elements is equal to any element in the array

  • Return all combinations that meet the criteria

Add your answer

Q41. What features will you add for WhatsApp and what features will you remove/improve in WhatsApp?

Ans.

I would add a feature for scheduling messages and improve the privacy settings while removing the 'forwarded' label.

  • Add a scheduling feature for messages to be sent at a later time

  • Improve privacy settings by allowing users to control who can add them to groups

  • Remove the 'forwarded' label to reduce the spread of misinformation

Add your answer
Q42. How would you design a traffic light system?
Ans.

Designing a traffic light system involves creating a system that controls the flow of traffic at intersections.

  • Divide the traffic light system into three main lights: red, yellow, and green.

  • Implement timers to control the duration of each light.

  • Include sensors to detect the presence of vehicles and pedestrians.

  • Consider implementing a pedestrian crossing signal.

  • Integrate a central control system to coordinate the timing of lights at different intersections.

Add your answer
Q43. How do you copy files in Linux?
Ans.

To copy files in Linux, you can use the 'cp' command.

  • Use the 'cp' command followed by the source file and destination directory to copy a file.

  • To copy a directory and its contents, use the '-r' flag with the 'cp' command.

  • You can also use wildcards like '*' to copy multiple files at once.

Add your answer

Q44. Given n starting with all 1 find the kth number example: n = 3, k= 4 1 1 1

Ans.

Given n starting with all 1, find the kth number.

  • The kth number is obtained by incrementing the binary representation of n.

  • Repeat until k-1 increments are done.

  • Return the final value of n.

Add your answer

Q45. Program to find the next bigger number for the given number by just interchanging it's digits.ex- for 533224, answer is 533242

Ans.

Program to find the next bigger number for the given number by interchanging its digits.

  • Convert the number to a string to access individual digits

  • Start from the rightmost digit and find the first digit that is smaller than the digit to its right

  • Swap this digit with the smallest digit to its right that is greater than it

  • Sort the digits to the right of the swapped digit in ascending order

  • Convert the string back to a number and return

Add your answer

Q46. How your work will increase our revenue? By sharing the data we can improve our services.

Ans.

Sharing data insights can help improve services and identify revenue opportunities.

  • Analyzing customer behavior can help identify areas for improvement

  • Identifying trends in sales data can help optimize pricing strategies

  • Using data to personalize marketing efforts can increase customer engagement

  • Predictive modeling can help identify potential revenue opportunities

  • Tracking key performance indicators can help optimize business operations

Add your answer
Q47. Can you explain the OSI Model?
Ans.

The OSI Model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven layers.

  • The OSI Model stands for Open Systems Interconnection Model.

  • It consists of seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.

  • Each layer has specific functions and communicates with the adjacent layers.

  • Example: Layer 1 (Physical) deals with physical connections like cables, Layer 2 (Data Link) handles e...read more

Add your answer

Q48. Smallest window in a string containing all the characters of another string.(GFG)

Ans.

Find the smallest window in a string containing all characters of another string.

  • Use a sliding window approach to find the smallest window

  • Create a frequency map of characters in the second string

  • Slide the window and update the frequency map until all characters are found

  • Track the minimum window size and indices

View 1 answer
Q49. What are the different OOP concepts?
Ans.

OOP concepts include inheritance, encapsulation, polymorphism, and abstraction.

  • Inheritance allows a class to inherit properties and behavior from another class.

  • Encapsulation restricts access to certain components of an object, protecting its integrity.

  • Polymorphism allows objects to be treated as instances of their parent class.

  • Abstraction hides the complex implementation details of an object and only shows the necessary features.

Add your answer

Q50. Algorithm to find if any 5 numbers add up to the value of the Sum

Ans.

Use a hash set to store seen numbers and check if the complement of current number is in the set.

  • Iterate through the array and for each number, check if the complement of the current number is in the hash set.

  • If the complement is found, return true. Otherwise, add the current number to the hash set.

  • Repeat this process for all numbers in the array.

  • Example: Array [1, 2, 3, 4, 5] and Sum 9 should return true as 4 + 5 = 9.

Add your answer

Q51. Design a business plan for RedBus if it wants to enter into Indonesian market (Market Sizing, 4Ps, Competition etc.)

Ans.

RedBus can enter Indonesian market by targeting the growing middle class and partnering with local bus operators.

  • Conduct market research to identify target audience and competition

  • Partner with local bus operators to expand network and gain local expertise

  • Offer competitive pricing and promotions to attract customers

  • Invest in marketing and advertising to increase brand awareness

  • Ensure seamless user experience through website and mobile app

  • Consider offering additional services s...read more

Add your answer

Q52. What is Redux state management? What is event loop, call back queue and call stack? Difference between let, const, var output questions based on set timeout, this, scoping. Coding question - zigzag string conve...

read more
Ans.

Redux is a predictable state container for JavaScript apps. Event loop, call stack, and callback queue manage asynchronous operations. let, const, var differ in variable scoping and reassignment. setTimeout delays execution. 'this' refers to the current context. Scoping determines variable accessibility.

  • Redux is a state management tool for JavaScript apps, ensuring predictable state changes.

  • Event loop manages the execution of callback functions, while call stack keeps track o...read more

Add your answer
Q53. What is a virtual function?
Ans.

A virtual function is a function in a base class that is declared using the keyword 'virtual' and can be overridden by a function with the same signature in a derived class.

  • Virtual functions allow for dynamic polymorphism in C++

  • They are used in inheritance to achieve runtime polymorphism

  • Virtual functions are declared in a base class and can be overridden in derived classes

  • They are called based on the type of object being pointed to or referred to, not the type of pointer or r...read more

Add your answer

Q54. What qualities should one have in sales?

Ans.

Salespeople should have good communication skills, be persistent, knowledgeable, and empathetic.

  • Excellent communication skills

  • Persistence and determination

  • Product and industry knowledge

  • Empathy and emotional intelligence

  • Ability to build relationships

  • Negotiation skills

  • Time management and organization

  • Adaptability and flexibility

Add your answer

Q55. 3. what is function overloading and overriding (difference between them)

Ans.

Function overloading and overriding are concepts in object-oriented programming that involve the use of multiple functions with the same name.

  • Function overloading refers to the ability to have multiple functions with the same name but different parameters in a class.

  • Function overriding refers to the ability to have a derived class provide a different implementation of a method that is already defined in its base class.

  • Overloading is resolved at compile-time based on the numbe...read more

Add your answer

Q56. Deadlocks,4 conditions of Deadlocks and ways of preventing Deadlock

Ans.

Deadlocks occur when two or more processes are waiting for each other to release resources, leading to a standstill.

  • 4 conditions of Deadlocks: mutual exclusion, hold and wait, no preemption, circular wait

  • Preventing Deadlocks: using a proper resource allocation strategy, implementing timeouts, avoiding circular wait, using deadlock detection and recovery algorithms

  • Example: Two processes each holding a resource and waiting for the other to release the resource, causing a deadlo...read more

Add your answer

Q57. Design a digital video streaming service. GTM and Monetization as well.

Ans.

A digital video streaming service with GTM and monetization.

  • Develop a user-friendly platform with a wide range of video content.

  • Implement a robust content delivery network (CDN) for seamless streaming.

  • Offer personalized recommendations based on user preferences and viewing history.

  • Integrate social sharing features to enhance user engagement.

  • Implement a subscription-based model with tiered pricing options.

  • Leverage targeted advertising to generate additional revenue.

  • Collaborate...read more

View 1 answer

Q58. Given a linked list with next and arbitrary pointers, clone it

Add your answer

Q59. Reverse the second half of the linked list in the most efficient way

Ans.

Reverse the second half of a linked list efficiently.

  • Find the middle node of the linked list

  • Reverse the second half of the linked list using a pointer

  • Update the pointers to connect the reversed second half with the first half

Add your answer

Q60. How will you increase the revenue of Netflix by 10x.

Ans.

To increase Netflix's revenue by 10x, we can focus on expanding the subscriber base, increasing subscription prices, and diversifying revenue streams.

  • Expand the subscriber base by targeting new markets and demographics

  • Increase subscription prices for premium features or exclusive content

  • Diversify revenue streams through partnerships, merchandise sales, or live events

Add your answer

Q61. Check whether linked list is Pallindrome or not

Ans.

To check if a linked list is a palindrome, compare the first half of the list with the reversed second half.

  • Traverse the linked list to find the middle element using slow and fast pointers.

  • Reverse the second half of the linked list.

  • Compare the first half with the reversed second half to check for palindrome.

Add your answer

Q62. Write algo for reversing a linked list

Ans.

Algorithm to reverse a linked list

  • Create a new empty linked list

  • Traverse the original linked list and insert each node at the beginning of the new list

  • Return the new list

Add your answer

Q63. Given a string a="aabbfaffb"; &amp; b="ab", write a code to replace given string and print "faffb"

Ans.

Replace substring in a given string and print the remaining string

  • Use string.replace() method to replace the substring

  • Print the remaining string using string slicing

Add your answer

Q64. Do you know something about google ad-words?

Ans.

Yes, Google AdWords is an online advertising platform developed by Google.

  • Google AdWords allows businesses to create and display ads on Google's search engine results pages and other websites.

  • It works on a pay-per-click model, where advertisers bid on keywords and pay for each click on their ads.

  • AdWords also offers various targeting options, such as location, language, device, and audience demographics.

  • It has now been rebranded as Google Ads and includes additional advertisin...read more

Add your answer

Q65. How will you measure the success of Google Pay?

Ans.

The success of Google Pay can be measured through user adoption rates, transaction volume, customer satisfaction, and revenue generated.

  • User adoption rates: Tracking the number of users who have downloaded and actively use the Google Pay app.

  • Transaction volume: Monitoring the total value and frequency of transactions processed through Google Pay.

  • Customer satisfaction: Conducting surveys or analyzing feedback to gauge user satisfaction with the app's features and performance.

  • R...read more

Add your answer

Q66. What is DNS(Domain Name System)

Ans.

DNS is a system that translates domain names to IP addresses, allowing users to access websites using human-readable names.

  • DNS is like a phone book for the internet, translating domain names (e.g. google.com) to IP addresses (e.g. 172.217.3.206).

  • DNS servers store records that map domain names to IP addresses, helping users navigate the internet.

  • DNS also helps with email delivery by translating domain names in email addresses to IP addresses for routing purposes.

Add your answer

Q67. What is meaning of customer service for you?

Ans.

Customer service is the provision of assistance and support to customers before, during, and after purchase.

  • Customer service involves actively listening to customers and addressing their concerns

  • It is important to provide timely and accurate information to customers

  • Going above and beyond to exceed customer expectations is a key aspect of customer service

  • Customer service can help build long-term relationships with customers and increase customer loyalty

  • Examples of good custome...read more

Add your answer

Q68. find the min steps to convert string a to b, you can use deletion, insertion and replace any number of times.

Ans.

Use dynamic programming to find the minimum steps to convert string a to b by deletion, insertion, or replacement.

  • Create a 2D array to store the minimum steps required to convert substrings of a to substrings of b.

  • Initialize the array with base cases for empty strings and iterate through the rest of the array to fill in the values based on previous calculations.

  • The final value in the bottom right corner of the array will be the minimum steps required to convert the entire str...read more

Add your answer
Q69. How does AJAX work?
Ans.

AJAX allows for asynchronous communication between client and server without needing to reload the entire page.

  • AJAX stands for Asynchronous JavaScript and XML.

  • It allows for sending and receiving data from a server without reloading the entire page.

  • AJAX uses XMLHttpRequest object to make requests to the server.

  • It can update parts of a web page without requiring a full page reload.

  • Commonly used in web applications to provide a more seamless user experience.

Add your answer

Q70. dba differnce/explain mysql or nosql databse

Ans.

MySQL is a relational database management system, while NoSQL databases are non-relational databases.

  • MySQL is a traditional relational database that uses tables to store data and SQL for querying.

  • NoSQL databases are non-relational and can be document-based, key-value pairs, wide-column stores, or graph databases.

  • MySQL is ACID-compliant and suitable for complex queries and transactions.

  • NoSQL databases are often used for large-scale distributed data storage and processing.

  • Examp...read more

Add your answer

Q71. Develop a 5-year strategy for MakeMyTrip.

Ans.

Develop a 5-year strategy for MakeMyTrip.

  • Expand into new markets and increase customer base

  • Invest in technology to improve user experience and streamline operations

  • Offer personalized travel packages and loyalty programs

  • Partner with airlines and hotels to offer exclusive deals

  • Focus on sustainability and responsible tourism

  • Explore opportunities in emerging technologies like AI and blockchain

Add your answer

Q72. Design a traffic light system?

Ans.

A traffic light system controls the flow of traffic at intersections.

  • The system consists of three lights: red, yellow, and green.

  • Each light has a specific duration for which it stays on.

  • The system also includes sensors to detect the presence of vehicles and pedestrians.

  • The duration of each light can be adjusted based on traffic patterns.

  • The system can be connected to a central control system for remote monitoring and management.

Add your answer

Q73. How do you think it aligns with MMT

Add your answer

Q74. Find the merging point of two linked list

Add your answer

Q75. What is GST and GST on commission?

Ans.

GST stands for Goods and Services Tax, a tax levied on the supply of goods and services in India.

  • GST is a comprehensive indirect tax that has replaced many indirect taxes in India.

  • It is levied on the value-added to goods and services at each stage of the supply chain.

  • GST on commission refers to the tax levied on the commission earned by a person or entity for providing services.

  • The rate of GST on commission varies depending on the type of service provided.

  • For example, the GST...read more

Add your answer

Q76. One java string question merge two strings diagonally.

Ans.

Merge two strings diagonally in a Java array of strings.

  • Iterate through each row and column to merge characters diagonally

  • Keep track of the diagonal position to insert characters from both strings

  • Handle cases where strings have different lengths

  • Example: String 1: 'hello', String 2: 'world', Merged: 'hweolrllod'

  • Example: String 1: 'abc', String 2: '123', Merged: 'a1b2c3'

Add your answer

Q77. How to teach a about computer?

Ans.

Teach computer basics through hands-on activities and interactive lessons.

  • Start with the basics of hardware and software

  • Introduce programming concepts through block-based coding

  • Encourage exploration and experimentation with different programs and tools

  • Teach internet safety and responsible use

  • Provide opportunities for students to collaborate and problem-solve

  • Use real-world examples to demonstrate the practical applications of computer science

Add your answer

Q78. What is Google's revenue model?

Ans.

Google's revenue model is primarily based on advertising through its search engine and other platforms.

  • Google earns revenue through its AdWords program, where advertisers bid on keywords to display their ads in search results and other Google platforms.

  • Google also earns revenue through its AdSense program, where website owners can display Google ads on their sites and earn a share of the revenue.

  • Other sources of revenue for Google include cloud services, hardware sales, and a...read more

Add your answer

Q79. create autosuggest debounce, pollyfill

Ans.

Autosuggest debounce is a feature that delays the search suggestions until the user stops typing, and a polyfill is a piece of code that provides functionality that is not natively supported by the browser.

  • Implement a debounce function to delay the autosuggest feature until the user stops typing.

  • Use a polyfill to provide support for the autosuggest feature in browsers that do not natively support it.

  • Example: Implement a debounce function that waits for 300ms after the user st...read more

Add your answer

Q80. Design an app similar to Uber but for Kids.

Ans.

An app similar to Uber for kids, providing safe and reliable transportation services for children.

  • Parents can schedule rides for their children through the app

  • Drivers are thoroughly vetted and background checked for safety

  • Real-time tracking and notifications for parents to monitor their child's journey

  • Option for parents to set restrictions on drop-off locations and who can pick up the child

  • Emergency contact feature for parents and drivers to communicate in case of any issues

Add your answer

Q81. If you get 500 error how to debug.

Ans.

To debug a 500 error, check server logs, review code changes, test API endpoints, and use debugging tools.

  • Check server logs for error details

  • Review recent code changes that may have caused the error

  • Test API endpoints using tools like Postman

  • Use debugging tools like Chrome DevTools or Firebug

Add your answer

Q82. What keyskills you have so we will select you.

Ans.

I have excellent communication skills, strong leadership abilities, and extensive experience in the travel industry.

  • Strong communication skills, both verbal and written

  • Leadership abilities and experience managing teams

  • Extensive knowledge and experience in the travel industry

  • Ability to analyze data and make informed decisions

  • Excellent customer service skills

  • Proficiency in relevant software and technology

  • Flexibility and adaptability to changing situations

  • Multilingual abilities

  • A...read more

Add your answer

Q83. 2. Can one edit standard libraries of C?

Add your answer

Q84. Detect loop in a LinkedList,

Ans.

Detect loop in a LinkedList

  • Use two pointers, one moving at twice the speed of the other

  • If there is a loop, the faster pointer will eventually catch up to the slower one

  • If there is no loop, the faster pointer will reach the end of the list

Add your answer

Q85. Reverse a linked list in groups of n

Ans.

Reverse a linked list in groups of n

  • Create a function that takes a linked list and a group size as input

  • Iterate through the linked list, reversing each group of nodes

  • Keep track of the previous and current node to update the pointers

  • Handle cases where the group size is larger than the remaining nodes

  • Return the head of the reversed linked list

Add your answer

Q86. Vertical level order traversal of a tree

Ans.

Vertical level order traversal of a tree involves traversing the tree level by level from left to right in vertical order.

  • Use a queue to perform level order traversal of the tree.

  • Maintain a map to store nodes at each vertical level.

  • Start with root at vertical level 0 and update the vertical level for each node.

  • Example: For a tree with root 1, left child 2, and right child 3, the vertical level order traversal would be ['2', '1', '3'].

Add your answer

Q87. Do you have any idea how is it working

Ans.

Understanding how the role functions and the responsibilities involved.

  • The role involves providing support to customers, addressing their queries and concerns.

  • Requires strong communication skills to effectively interact with customers.

  • Involves troubleshooting technical issues and providing solutions.

  • May require working in a team to ensure customer satisfaction.

  • Understanding company products/services to better assist customers.

  • Continuous learning and updating knowledge to stay...read more

Add your answer

Q88. How is Uber pool beneficial?

Ans.

Uber pool is beneficial as it reduces traffic congestion, lowers transportation costs, and promotes social interaction.

  • Reduces traffic congestion by allowing multiple passengers to share a ride

  • Lowers transportation costs for passengers as they split the fare

  • Promotes social interaction by bringing people together who may not have otherwise met

  • Increases efficiency by reducing the number of cars on the road

  • Helps to reduce carbon emissions by reducing the number of cars on the ro...read more

Add your answer

Q89. When would Uber pool fail?

Ans.

Uber pool would fail if the demand for shared rides decreases or if the cost of providing the service becomes too high.

  • Decrease in demand for shared rides

  • Increase in cost of providing the service

  • Competition from other ride-sharing services

  • Regulatory changes affecting ride-sharing services

  • Safety concerns or incidents

  • Technological disruptions affecting the ride-sharing industry

Add your answer

Q90. 1. Difference between C and C++

Add your answer

Q91. tell me end to end operation

Ans.

End to end operation refers to the complete process from start to finish in a particular operation or project.

  • Start with understanding client requirements

  • Research and plan the trip itinerary

  • Book flights, accommodations, and activities

  • Provide necessary travel documents and information to the client

  • Ensure smooth travel experience and handle any issues that may arise

  • Follow up with the client for feedback and future bookings

Add your answer

Q92. Find element in sorted rotated array

Ans.

Search for an element in a sorted rotated array

  • Use binary search to find the pivot point where the array is rotated

  • Then perform binary search on the appropriate half of the array to find the element

  • Handle cases where the element is not found in the array

Add your answer

Q93. elevator system design

Ans.

Designing an elevator system involves considering factors like capacity, speed, efficiency, and safety.

  • Consider the number of floors in the building and the expected traffic flow to determine the number of elevators needed.

  • Choose between different elevator types such as hydraulic, traction, or machine-room-less based on building requirements.

  • Implement a control system to optimize elevator movement and reduce wait times for passengers.

  • Include safety features like emergency sto...read more

Add your answer

Q94. get a maximum sum from picking corner elements

Ans.

Find the maximum sum by picking corner elements of a matrix

  • Start by selecting the four corner elements of the matrix

  • Compare the sum of the diagonally opposite corners and choose the pair with the higher sum

  • Repeat the process with the remaining elements until all corners are picked

Add your answer

Q95. Kadanes algorithm

Ans.

Kadane's algorithm is used to find the maximum subarray sum in an array of integers.

  • Iterate through the array and keep track of the maximum sum ending at each index.

  • At each index, choose between extending the previous subarray or starting a new subarray.

  • Example: For array [-2, 1, -3, 4, -1, 2, 1, -5, 4], the maximum subarray sum is 6 (from index 3 to 6).

Add your answer

Q96. calculate no of rows after join

Ans.

Calculate the number of rows after joining two datasets.

  • Count the number of rows in each dataset

  • Perform the join operation

  • Count the number of rows in the resulting dataset

Add your answer

Q97. How to handle pressure

Add your answer

Q98. Journal entry for acquisitions

Ans.

Journal entry for acquisitions

  • Debit the assets acquired account for the fair value of the assets acquired

  • Credit the cash or liabilities assumed account for the fair value of the consideration given

  • Record any goodwill or bargain purchase gain or loss

  • Example: Debit Assets Acquired for $500,000, Credit Cash for $400,000 and Credit Liabilities Assumed for $100,000

Add your answer

Q99. number of buildings from n coins

Ans.

The number of buildings that can be built using n coins can be calculated using a mathematical formula.

  • Use the formula: number of buildings = floor(sqrt(2 * n + 0.25) - 0.5)

  • For example, if n = 5, then number of buildings = floor(sqrt(2 * 5 + 0.25) - 0.5) = floor(sqrt(10.25) - 0.5) = floor(3.2) = 3

Add your answer

Q100. Db design in depth for spotify

Ans.

Designing a database for Spotify involves creating tables for users, songs, playlists, and interactions.

  • Create tables for users, songs, playlists, interactions

  • Use relational database management system like MySQL or PostgreSQL

  • Implement indexes for faster query performance

  • Normalize data to reduce redundancy

  • Consider sharding for scalability

Add your answer
1
2
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Westin

based on 96 interviews
Interview experience
3.9
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.7
 • 643 Interview Questions
3.5
 • 435 Interview Questions
3.7
 • 401 Interview Questions
4.0
 • 248 Interview Questions
3.9
 • 185 Interview Questions
4.2
 • 142 Interview Questions
View all
Top MakeMyTrip Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 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