Recruitment Software - Application Display Update
There are N applicants who have applied for a job vacancy. Each applicant has an application ID ranging from 1 to N.
During the initial round of recruitment, the company's software assigns each applicant a score value, which can be positive or negative:
- A positive score indicates the applicant is qualified for the vacancy.
- A negative score
Asked in: Flipkart
A chat application is building a new immersive feature for their customers to enhance their experience. To train the model for this feature, the developers have prepared a dataset.
In the dataset, there are two columns:
The first column contains a new search term A (a string written without spaces).
The second column contains N unique space-separated words.
Task
The training model is design
Asked in: Flipkart
Houses in Hackerland
The city of Hackerland has many houses, each of which is connected via roads. There are house_nodes number of houses, numbered 0 to house_nodes - 1, where each pair of houses is connected and has a unique shortest path between them. Thus, the network of houses and roads forms an undirected tree structure comprising house_nodes nodes and (house_nodes - 1) edges. Each of the ed
Asked in: Flipkart
Modified Knapsack Problem
The Knapsack problem is a well-known problem in the field of computer programming and problem-solving. To make it more interesting, an interviewer uses a modified version of the problem.
Given n items, where the weight of the i-th item is 2^i, and the cost of the i-th item is cost[i], find the minimum amount needed to purchase the items such that the combined weight o
Asked in: Flipkart
Question 2
Implement a Least Frequently Used (LFU) cache data structure of size cacheSize that handles two types of queries: GET and PUT.
A GET query attempts to retrieve the value of a given key.
If the key is present in the cache, it is returned.
Otherwise, it returns -1.
A PUT query updates or inserts a key-value pair into the cache.
When the cache is full, the least frequentl
Asked in: ShareChat
A forklift operator navigates products within an automotive parts warehouse. The dashboard displays a real-time map showing open and blocked sections as an n x m matrix of 1's (open) and 0's (blocked). The operator starts at the top-left corner of the map at warehouse[0][0] and aims to reach the bottom-right corner at warehouse[n-1][m-1].
Movements can only be made to the right or downward. Giv
Asked in: ShareChat
1. Question 1
Given a chessboard of n rows (top to bottom) and n columns (left to right). In each move, a knight moves either:
2 column positions and 1 row position
2 row positions and 1 column position
In other words, a move is 2 steps along one axis and 1 step along a perpendicular axis.
Given a starting position A and ending position B, calculate the minimum number of moves needed by the k
Asked in: ShareChat
The class uses a novel system where the success of an individual is assigned to a symbol. These symbols have the following precedence:
A > B > C > D > E > F
The symbols are collected and fed into the assessment robot. The success of the class is determined in the following way, with the output in green at the end:
"AAABBCDDEFF"
Sometimes it is ambiguous what the output is. In this case
Asked in: Siemens
4. Question 4
Your colleagues often bring a few books to the office to read, then put them into shared book shelves, so other people have the chance to read it as well. After some days, the shelves have become messier and messier. As the office manager you are tasked to develop a function to sort them.
As the basic information of a book, the name, author and edtion will be recorded.
The fun
Asked in: Siemens
You are a part of the World of Wizards—a global society of magicians. It's your task to create a "warped-spell" that helps the society ensure the authenticity and secrecy of its members.
All the members meet once a month at a secret club. In order to ensure the authenticity of members, each member is sent a "secret" number of 1-7 digits, 10 days before the meeting.
On the meeting day, each m
Asked in: Siemens