Urban Company
10+ KPMG India Interview Questions and Answers
Q1. Minimize Maximum Difference Between Adjacent Elements
You are provided with a non-decreasing array and an integer K. Your task is to remove exactly K elements from this array so that the maximum difference betw...read more
Q2. Meeting Rooms Allocation Problem Statement
Stark Industry is planning to organize meetings for various departments in preparation for Stark Expo. Due to limited rooms in Stark Tower, the goal is to allocate mee...read more
Q3. Maximize XOR Value
You are provided with an integer X
and are tasked with identifying an integer Y
such that the bitwise XOR operation between X
and Y
yields the maximum possible value. The condition is that Y
...read more
Q4. Implement indexOf Function
You are provided with two strings A
and B
. Your task is to find the index of the first occurrence of A
within B
. If A
is not found in B
, return -1.
Example:
Input:
A = "bc", B = "abcd...read more
Q5. Frequency in a Sorted Array Problem Statement
Given a sorted array ARR
and a number X
, your task is to determine the count of occurrences of X
within ARR
.
Note:
- If
X
is not found in the array, return 0. - The ar...read more
Q6. Print All Subsets Challenge
Given an array arr
containing 'N' distinct integers, your task is to generate all possible non-empty subsets of this array.
Note: While the elements within each subset should be in i...read more
Q7. Distinct Subsequences Problem Statement
You are given a string 'S' of length 'N' which may include duplicate alphabets. Your goal is to calculate the number of distinct subsequences in the string.
Example:
Inpu...read more
Q8. Clone Linked List with Random Pointer Problem Statement
Given a linked list where each node has two pointers: one pointing to the next node and another which can point randomly to any node in the list or null, ...read more
Q9. 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
Q10. Rotting Oranges Problem Statement
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
- 0 - representing an empty cell
- 1 - representing a fresh orange...read more
Q11. Shortest Path Visiting All Nodes
You are given a connected undirected unweighted graph comprising 'N' nodes and 'M' edges. In this graph, each pair of connected nodes is linked by exactly one undirected edge, a...read more
Q12. Find Row With Maximum 1's in a Sorted 2D Matrix
You are provided with a 2D matrix containing only the integers 0 or 1. The matrix has dimensions N x M, and each row is sorted in non-decreasing order. Your objec...read more
Q13. Amazing Strings Problem Statement
Determine if the third string contains all the characters from both the first and second strings in any order. If so, return "YES"; otherwise, return "NO".
Input:
Line 1: First...read more
Q14. Stock buy and sell with at most 2 transaction
Implement a solution to find the maximum profit from buying and selling stocks with at most 2 transactions.
Use dynamic programming to keep track of maximum profit at each day with 0, 1, or 2 transactions.
Consider the possibility of splitting the transactions into two separate parts.
Calculate the maximum profit by iterating through the prices array and updating the maximum profit accordingly.
Q15. what is thread ?
A thread is a lightweight process that can run concurrently with other threads within the same process.
Threads allow for parallel execution of tasks within a single process.
Threads share the same memory space and resources of the process they belong to.
Threads can communicate with each other through shared memory or message passing.
Examples: Java threads, POSIX threads (pthreads) in C/C++.
Q16. Binary search to find target
Binary search is a divide and conquer algorithm that efficiently finds a target value in a sorted array.
Divide the array in half and compare the target value with the middle element
If the target is less than the middle element, search the left half. If greater, search the right half
Repeat the process until the target is found or the subarray is empty
Q17. Design paytm wallet
Design a digital wallet system similar to Paytm.
Allow users to add money to their wallet using various payment methods like credit/debit cards, net banking, UPI, etc.
Enable users to make payments for various services like mobile recharge, bill payments, online shopping, etc.
Implement security measures like two-factor authentication, encryption of sensitive data, and regular security audits.
Provide features like transaction history, cashback offers, loyalty points, and seamles...read more
Interview Process at KPMG India
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month