Tip 1 : basic knowl;edge of operating system is a must
Tip 2 : Basic Knowledge of Linux is a plus
Tip 3 : good Knowledge of Data structures and problem solving
Tip 1 : development projects
Tip 2 : course and learning certificates to showcase your skills on any of programming language
Coding round Includes two coding questions of medium level each in language of your choice , I was able to solve all questions correctly



A character from an index of a string(str1) is put at the end of it, is defined as a single operation.
You cannot perform any operation on the string, str2.
1) Find if A can be transformed to B or not by first creating a count array for all characters of A, then checking with B if B has same count for every character.
2) Initialize result as 0.
3) Start traversing from end of both strings.
……a) If current characters of A and B match, i.e., A[i] == B[j]
………then do i = i-1 and j = j-1
b) If current characters don’t match, then search B[j] in remaining
………A. While searching, keep incrementing result as these characters
………must be moved ahead for A to B transformation.




1>Find a path from the root to n1 and store it in a array.
2>Find a path from the root to n2 and store it in another vector or array.
3>Traverse both paths till the values in arrays are the same. Return the common element just before the mismatch.
This was completely technical round
Started with Introduction
Then interviewer asked me to solve puzzle problems
He gave me two puzzles , i was able to solve both
Then he tested my programming skills and my knowledge on Python
There are 10 machines in a factory. Each produces coins weighing 10 grams each. One day the factory owner cones to know that one of the machine is not functioning properly and produces coins of weight 9 grams. You have to find out the faulted machine. You ONLY have a weighing machine and you can use it only ONCE.
Tip 1: Think Logically
Tip 2: Discuss it with the interviewer whatever comes in your mind
Tip 3: Treat it like a discussion and not an interview
You have 9 balls, equally big, equally heavy - except for one, which is a little heavier.
How would you identify the heavier ball if you could use a pair of balance scales only twice?
Tip 1: Divide the 9 balls into 3 groups of 3
Tip 2: Compare the weight of two of those groups.



1. Constructor:
It initializes the data members(queues) as required.
2. push(data) :
This function should take one argument of type integer. It pushes the element into the stack and returns nothing.
3. pop() :
It pops the element from the top of the stack and, in turn, returns the element being popped or deleted. In case the stack is empty, it returns -1.
4. top :
It returns the element being kept at the top of the stack. In case the stack is empty, it returns -1.
5. size() :
It returns the size of the stack at any given instance of time.
6. isEmpty() :
It returns a boolean value indicating whether the stack is empty or not.
Query-1(Denoted by an integer 1): Pushes an integer data to the stack. (push function)
Query-2(Denoted by an integer 2): Pops the data kept at the top of the stack and returns it to the caller. (pop function)
Query-3(Denoted by an integer 3): Fetches and returns the data being kept at the top of the stack but doesn't remove it, unlike the pop function. (top function)
Query-4(Denoted by an integer 4): Returns the current size of the stack. (size function)
Query-5(Denoted by an integer 5): Returns a boolean value denoting whether the stack is empty or not. (isEmpty function)
Operations:
1 5
1 10
2
3
4
Enqueue operation 1 5: We insert 5 at the back of the queue.
Queue: [5]
Enqueue operation 1 10: We insert 10 at the back of the queue.
Queue: [5, 10]
Dequeue operation 2: We remove the element from the front of the queue, which is 5, and print it.
Output: 5
Queue: [10]
Peek operation 3: We return the element present at the front of the queue, which is 10, without removing it.
Output: 10
Queue: [10]
IsEmpty operation 4: We check if the queue is empty.
Output: False
Queue: [10]
In a push operation, the new element is always enqueued to q1. In pop() operation, if q2 is empty then all the elements except the last, are moved to q2. Finally, the last element is dequeued from q1 and returned.
1> push(s, x) operation:
Enqueue x to q1 (assuming size of q1 is unlimited).
2> pop(s) operation:
One by one dequeue everything except the last element from q1 and enqueue to q2.
Dequeue the last item of q1, the dequeued item is result, store it.
Swap the names of q1 and q2
Return the item stored in step 2
This round was similar to 2nd round
Started with introduction
Then the interviewer asked me few linux based questions
Then some questions related to operating system and networking
What is Process Synchronization, Deadlock, Virtual Memory?
What is memory leak?


1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Traverse the whole linked list and count the no. of nodes. Now traverse the list again till count/2 and return the node at count/2.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?