(All Questions asked in TCS - Digital Interviews) π»π»
First technical interview :
1. BE Project idea and details
2. Array rotation code
Given an array 1 2 3 4 5 , you have to shift it left by 2 , ans should be 3 4 5 1 2
(Ans : Reversal algorithm or direct formula)
3. How would you detect a loop in a Linked list ? (Floyd's algo)
4. Puzzle : You have two candles , which can be lit on both sides , if you light it on one side , it takes 60 mins to burn completely , using these 2 candles how would you measure 45 mins ?
5. Puzzle : Given 8 balls , one of them is heavier , you have a legacy balance , how many weighs would you need to find out the heavy ball
Answer : 2
Second technical interview :
1. Have you worked with embedded systems anywhere
2. Find the n th node of linked list from the end in one traversal .
3. Given a number , 1010 1110 , you have to shift all even digit bits to odd places and odd digit bits to even places . For above number answer would be 0101 1101.
4. You have a linked list with some nodes where each node's data occur twice , but there's a number which occurs only once . Can you find the number in one traversal ?
5. Given a structure , how much memory would it actually take internally .
struct s {
bool b ,
char c ,
char *ptr ,
u_int16_t p
}
6. TCP UDP
7. Puzzle : You have 100 eggs numbered 1 to 100 , each time you smash alternate eggs , which egg would remain at last .
eg . 1 2 3 4 ... 100
After smashing alternate eggs : 2 4 6 8 ..
Next iteration eggs that remain : 4 8 ..
8. What do you understand by a transaction
Third technical interview :
1. Do you know what RTOS is ?
2. Semaphore Mutex ? What are the use cases that you use these both ? Do you only use these for critical section ?
3. Write a code for bubble sort
4. Array rotation again (mentioned in interview 1 )
5. How would you implement cache .. write a code for that ( discussion went on to priority queue and then heap data structure)
6. What is page fault ?
7. How would you ensure that a binary tree is BST ?
8. If you have to design a website like Amazon Flipkart , how would you design it using JSP Servlets ? Each time you want to fetch any image from database , would you always go to the database ?
9. Given a list of cities , find minimum distance between any two cities . Write a code for this .
10 . Primary key and foreign key
11. Indexing , how is it actually implemented ?
12. Google Cloud Platform , saas paas iaas examples
No comments:
Post a Comment