JUSPAY
10+ ManpowerGroup Interview Questions and Answers
You are given a maze consisting of N cells numbered from 0 to N - 1 and an array ‘arr’ of N integers in which arr[i] contains the cell number that can be reached from ‘i’th cell in one step. You ar...read more
You have been given an undirected graph of ‘V’ vertices (labelled from 0 to V-1) and ‘E’ edges. Each edge connecting two nodes u and v has a weight denoting the distance between them.
Yo...read more
The question is about finding the shortest path distance from a source node to all vertices in an undirected graph.
The graph is represented by the number of vertices and edges, followed by the edges and their distances.
The task is to find the shortest path distance from the source node (0) to all other nodes.
If a node is disconnected from the source node, print the maximum positive integer value (2147483647).
Implement the function and return the shortest path distances in asc...read more
You have been given an N-ary tree ‘N’ nodes with node ‘1’ as head of the tree. Encode the above N-ary tree into a binary tree such that if only the encoded binary tree was given ...read more
The task is to encode an N-ary tree into a binary tree and then decode the binary tree back into the original N-ary tree.
Encode the N-ary tree by representing each node as a binary tree node with its first child as the left child and subsequent children as the right child.
To decode the binary tree, traverse the binary tree and for each node, create a new N-ary tree node with its left child as the first child and subsequent right children as siblings.
Use a level order traversa...read more
You are given a directed and unweighted graph of 'V' vertices and 'E' edges. All edges are given in a 2-dimensional array ‘Edges’ in which ‘Edges[i][0]’ and ‘Edges[i][1]’ contain an edge. Yo...read more
The task is to check if there exists a path from a given source vertex to a destination vertex in a directed and unweighted graph.
Read the number of test cases.
For each test case, read the number of vertices and edges.
Read the edges of the graph.
Read the source and destination vertices.
Implement a graph traversal algorithm (e.g., BFS or DFS) to check if a path exists from the source to the destination.
Print 'true' if a path exists, otherwise print 'false'.
You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a squar...read more
Ninja went to an amusement park and visited a maze. Now, he is stuck in the maze. He can go in any direction(Up, Down, Left, or Right) from this point, but he cannot change his direction of mo...read more
What are the different lifecycle methods in React?
Explain Strict Mode in React.
How to prevent re-renders in React?
Lifecycle methods in React, Strict Mode, and preventing re-renders.
Lifecycle methods in React include componentDidMount, componentDidUpdate, componentWillUnmount, etc.
Strict Mode is a tool for highlighting potential problems in React components.
To prevent re-renders in React, use shouldComponentUpdate or React.memo.
Q8. how unordered set is implemented?
Unordered set is typically implemented using hash tables.
Uses hash tables to store elements with unique keys
Provides constant time complexity for insertion, deletion, and lookup operations
Does not maintain any specific order of elements
Q9. Optimisation of Part-A Solution
Optimizing Part-A solution involves identifying bottlenecks and improving efficiency.
Identify the most time-consuming parts of Part-A solution
Analyze the algorithms and data structures used for optimization
Consider parallel processing or distributed computing for faster execution
Optimize database queries and reduce unnecessary operations
Use caching mechanisms to store frequently accessed data
Q10. SQL query for specific case
SQL query to retrieve specific data based on a condition
Use SELECT statement to specify the columns to retrieve
Use WHERE clause to specify the condition for filtering the data
Use JOIN clause to combine data from multiple tables if needed
Q11. how set is implemented?
A set is implemented as a data structure that stores unique elements with no specific order.
A set does not allow duplicate elements.
Sets are commonly implemented using hash tables or binary search trees.
Examples of set implementations include HashSet in Java and std::set in C++.
Q12. 5 coins problem
The 5 coins problem involves finding the minimum number of weighings needed to identify a counterfeit coin among 5 identical coins.
Divide the coins into 3 groups of 2, 2, and 1 coin(s).
Weigh the 2 groups of 2 coins against each other.
If the 2 groups weigh the same, the counterfeit coin is in the group of 1 coin.
If one group is heavier, the counterfeit coin is in that group.
Weigh the 2 coins in the heavier group to find the counterfeit coin.
More about working at JUSPAY
Interview Process at ManpowerGroup
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month