Hot Topics
GreyB Solution
Technical Round
- Question 1
What is the maximum number of qualified pieces that you can cut of a circular pie in maximum of 3 cuts?
- Answer
The maximum number of qualified pieces that you can cut of a circular pie in maximum of 3 cuts is 8
Step 1: Cut the cake into 4 pieces using 2 cuts.
Step 2: Stack all the 4 pieces.
Step 3: Finally with the third cut just cut the stack of 4 pieces to get 8 pieces in minimum number of cuts.
- Question 2
How to add two numbers without using the + sign or addition binary operator but you can use unary + operator in any programming language or in general?
- Answer
We can use printf() to find sum of two numbers as printf() returns the number of characters printed. The width field in printf() can be used to find the sum of two numbers. We can use ‘*’ which indicates the minimum width of output.
#include <stdio.h>
int add(int x, int y)
{
return printf("%*c%*c", x, ' ', y, ' ');
}
int main()
{
printf("Sum = %d", add(3, 4));
return 0;
}
/*
Sum = 7
*/
- Question 3
Technology you can use to know how many cars stop in a city B after leaving city A.
- Answer
There are several technologies that can be used to track the movement of vehicles and determine how many cars stop in a city B after leaving city A.
GPS tracking: This technology uses satellite-based navigation systems to track the location and movement of vehicles in real-time. GPS tracking devices can be installed in vehicles and the data can be transmitted to a central server for monitoring and analysis.
Automatic license plate recognition (ALPR): This technology uses cameras and image recognition software to capture and read license plate numbers. It can be used to track the movement of vehicles between cities and determine how many cars stop in a specific city.
RFID technology: RFID (Radio-Frequency Identification) tags can be installed in vehicles and read by RFID readers at designated locations. This technology can be used to track the movement of vehicles between cities and determine how many cars stop in a specific city.
Cellular network data: By analyzing the movement of mobile phones, it’s possible to infer the movement of cars. By having a dataset of the cellular network of the area, it’s possible to know how many cars passed by a certain location.
Video surveillance: City traffic cameras and other video surveillance systems can be used to track the movement of vehicles and determine how many cars stop in a specific city. Video footage can be analyzed manually or using computer vision algorithms to identify vehicles and their movements.
Toll booth data: Some cities have toll booths which collect the data of the vehicles passing through them. This data can be used to identify which vehicles passed through the toll booth and how many of them stopped in the city B after leaving city A.
- Question 4
How does 5G work? How is it better than 4G?
- Answer
5G works on orthogonal frequency division multiplexing (OFDM) and on the same mobile networking principles.
5G is better than 4G in the respective points:
It is faster than 4G
5G has low latency
It has more capability than 4G
It uses spectrum better than 4G
- Question 5
Hash function and collision resolution techniques.
- Answer
There are several collision resolution techniques:
Open addressing: In this technique, if a collision occurs, the next available slot in the hash table is checked for an empty space. If an empty space is found, the data is stored there, otherwise, the process is repeated until an empty space is found.
Separate chaining: In this technique, instead of storing data in a single array, each slot in the hash table points to a linked list. If a collision occurs, the data is added to the linked list at the corresponding slot.
Linear probing: This is a variation of open addressing, in which the next available slot is found by incrementing the original hash value.
Quadratic probing: This is also a variation of open addressing, in which the next available slot is found by incrementing the original hash value using a quadratic function.
Cuckoo Hashing: In this technique, a key is stored in one of two possible locations in the hash table, determined by two different hash functions.
Robin Hood Hashing: In this technique, elements are stored in the hash table according to their relative position in the table. Elements that are closer to their ideal position will push elements that are farther away, to reduce the chances of collisions.
- Question 6
Why should I buy your project if it is made on a commercial level?
- Answer
Explain the Uniqueness, features of your project.
- Question 7
Do you like research and working on cutting edge technology?
- Answer
Yes, because this way I get to know about the nre technologies that are a available in the market, which will in turn expand my knowledge