Expedia Group
20+ Patel Motors Maruti True Value Interview Questions and Answers
Q1. Count and Say Sequence Problem
The 'Count and Say' sequence is a series of strings in which each consecutive term is generated by describing the previous term. The sequence begins with '1'.
Your task is to dete...read more
Q2. Ninja's Jump Task
The Ninja has been given a challenge by his master to reach the last stone. These stones are represented as an array of numbers. The Ninja can jump using either odd-numbered or even-numbered j...read more
Q3. Count Ways to Reach the N-th Stair Problem Statement
You are provided with a number of stairs, and initially, you are located at the 0th stair. You need to reach the Nth stair, and you can climb one or two step...read more
Q4. Problem: Search In Rotated Sorted Array
Given a sorted array that has been rotated clockwise by an unknown amount, you need to answer Q
queries. Each query is represented by an integer Q[i]
, and you must determ...read more
Q5. Incremental Partitioning Problem Statement
Given two integers N and K, determine how many ways you can partition the number N into K non-empty groups such that the size of each group[i] >= group[i-1] for each v...read more
Q6. 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
Q7. Version Comparison
Given two strings, Version1
and Version2
, each representing version numbers, determine which one is the latest version.
Explanation:
The input strings consist of digits and dots only. Both st...read more
Q8. Find the Third Greatest Element
Given an array 'ARR' of 'N' distinct integers, determine the third largest element in the array.
Input:
The first line contains a single integer 'T' representing the number of te...read more
Q9. Count Substrings with Only Vowels
In this task, you need to find the number of substrings within a given string ’S’ that consist only of vowels.
Explanation:
A substring is defined as a contiguous sequence of c...read more
Q10. Valid Parentheses Problem Statement
Given a string 'STR' consisting solely of the characters “{”, “}”, “(”, “)”, “[” and “]”, determine if the parentheses are balanced.
Input:
The first line contains an integer...read more
Q11. Find Duplicates in an Array
Given an array ARR
of size 'N', where each integer is in the range from 0 to N - 1, identify all elements that appear more than once.
Return the duplicate elements in any order. If n...read more
Ninja's Lootcase Problem Statement
Ninja stumbled upon a locked suitcase while digging in his lawn. The only way to unlock it is by following specific instructions stated on an accompanying paper.
Explanation:
Q13. Distribute Items Problem Statement
Calculate the number of ways to distribute a given number of items 'N' among three people such that each person gets at least one item, and only one person receives the maximu...read more
Q14. Find the Winner Problem Statement
Given an array/list VOTES
containing names of candidates, where each entry represents the vote received by the candidate.
You need to determine the candidate with the maximum v...read more
Q15. Date Reformatting
You have a string 'S' representing a date in the "Day Month Year" format, where:
- Day is one of {"1st", "2nd", "3rd", ..., "29th", "30th", "31st"}.
- Month is one of {"Jan", "Feb", "Mar", "Apr",...read more
Q16. Distinct Islands Problem Statement
Given a two-dimensional array/list consisting of integers 0s and 1s, where 1 represents land and 0 represents water, determine the number of distinct islands. A group of conne...read more
Q17. Position of Right Most Set Bit
Determine the position of the rightmost set bit in the binary representation of a given number N.
Input:
T: Number of test cases
N: An integer for which the position of the rightmo...read more
Q18. Encode the Message Problem Statement
Given a text message, your task is to return the Run-length Encoding of the given message.
Run-length encoding is a fast and simple method of encoding strings, representing ...read more
Q19. Number of Islands Problem Statement
You are provided with a 2-dimensional matrix having N
rows and M
columns, containing only 1s (land) and 0s (water). Your goal is to determine the number of islands in this ma...read more
Q20. Minimum Distinct Labels Problem Statement
You are given N boxes on a table, each with an integer label. The labels of these boxes are provided in an array ARR
. Your task is to remove exactly M boxes such that t...read more
Interview Process at Patel Motors Maruti True Value
Top Software Developer Intern Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month