Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
It was a 60 minute online coding round. 2 programming questions were asked in this round.



1. Every train will depart on the same day and the departure time will always be greater than the arrival time. For example, A train with arrival time 2240 and departure time 1930 is not possible.
2. Time will be given in 24H format and colons will be omitted for convenience. For example, 9:05AM will be given as "905", or 9:10PM will be given as "2110".
3. Also, there will be no leading zeroes in the given times. For example, 12:10AM will be given as “10” and not as “0010”.
The idea is to use the sorted arrival and departure times of trains and count the total number of platforms needed at a time . Maintain a counter to count the total number of trains present at the station at any point.
If the train is scheduled to arrive next, increase the counter by one and update the minimum platforms needed if the count is more than the minimum platforms needed so far.
If the train is scheduled to depart next, decrease the counter by 1.
Time Complexity : O(nlogn)

1. Both the strings contain only lowercase alphabets and can contain duplicates.
2. Return the uncommon characters in lexicographically sorted order.
Concept of hashing can be applied to solve this problem.
1. Create a hash table with a size of 26 for all lowercase characters.
2. Mark each character as '0' (indicating it is not present in both strings).
3. Mark the presence of each character in the 1st string as a '1' in the hash table, denoting the 1st string.
4. Next, traverse the 2nd string. For every character in string 2, check whether its presence in the hash table is '1' or not. If it is a 1, you should mark its presence as a -1 (indicating that the character is common to both strings), otherwise you should mark it as a 2 (indicating the 2nd string).
Time complexity : O(m+n) where m,n are lengths of the two strings
The first one was a technical interview lasting for about 35 minutes.
Firstly, he asked me to introduce myself. I told about my academics, family, achievements, strengths and hobbies. He asked about my father's occupation and what and why have I got to learn from his work. I told my hobbies as playing logical games and solving logical questions as well as net-surfing.
He asked which type of websites do I visit and why. He asked me the areas of interest. And I told C, C++ and java. And, I prefer C++ more. He asked some basic theoretical questions. He gave me two programs to implement. Then, he gave me two SQL queries and also asked some questions on OS concepts. Then, he came to my project and asked about all my three projects done thoroughly with architecture and coding.
Later, he asked two puzzles and I answered them correctly.



In this variation of swapping two variables without using any temporary variable, concept of addition and subtraction can be used.
var1 = var1 + var2;
var2 = var1 - var2;
var1 = var1 - var2;
In the first variable we are storing the sum of both variable.
Then, in next step we are we are extracting the value of 1st variable by subtracting the value of 2nd variable form the sum & storing it in 2nd variable.
At last, we are extracting the original value of the 2nd variable & storing it in the 1st variable.
Insertion and deletion of elements from queue
1. Deletion: . An element can only be deleted when there is at least an element to delete i.e. rear > 0. Now, element at arr[front] can be deleted but all the remaining elements have to shifted to the left by one position in order for the dequeue operation to delete the second element from the left on another dequeue operation.
Dequeue()
{
if (front == rear) {
return
}
else {
for (i = 0; i < rear - 1; i++) {
queue[i] = queue[i + 1]
}
rear--
}
}
2. Insertion : Adding an element will be performed after checking whether the queue is full or not. If rear < n which indicates that the array is not full then store the element at arr[rear] and increment rear by 1 but if rear == n then it is said to be an Overflow condition as the array is full.
Enqueue(data)
{
if (capacity == rear) {
return
}
else {
queue[rear] = data
rear++
}
}
What is a deadlock and what are the solutions to it?
A Deadlock is a situation where each of the computer process waits for a resource which is being assigned to some another process. In this situation, none of the process gets executed since the resource it needs, is held by some other process which is also waiting for some other resource to be released.
Methods that are used in order to handle the problem of deadlocks are as follows:
1. Ignoring the Deadlock
According to this method, it is assumed that deadlock would never occur. This approach is used by many operating systems where they assume that deadlock will never occur which means operating systems simply ignores the deadlock.
2.Deadlock Prevention
The main aim of the deadlock prevention method is to violate any one condition among the four; because if any of one condition is violated then the problem of deadlock will never occur. As the idea behind this method is simple but the difficulty can occur during the physical implementation of this method in the system.
3.Avoiding the Deadlock
This method is used by the operating system in order to check whether the system is in a safe state or in an unsafe state. This method checks every step performed by the operating system. Any process continues its execution until the system is in a safe state. Once the system enters into an unsafe state, the operating system has to take a step back.
4.Deadlock detection and recovery
With this method, the deadlock is detected first by using some algorithms of the resource-allocation graph. This graph is mainly used to represent the allocations of various resources to different processes. After the detection of deadlock, a number of methods can be used in order to recover from that deadlock
What is process synchronization?
The goal of process synchronization is to coordinate the execution of processes in a way where no two processes can share the same data and resources. Multi-process systems often use this mechanism when multiple processes try to access the same data or resource simultaneously, especially when multiple processes are running simultaneously. This can lead to inconsistent shared data. Therefore, changes made by one process may not necessarily be reflected by other processes that access the same shared data. This type of data inconsistency can be avoided by synchronizing the processes.
Difference between C and C++
1. The C programming language is a procedural language type while C++ is an object-oriented programming language type.
2. C programming follows a top to down programming approach that focuses on the steps rather than the data. C++ follows a bottom-to-top approach that focuses on data rather than the overall procedure.
3. Since C is a structured programming language the program is divided into separate blocks known as functions. Since C++ is an object-oriented programming language, the code is divided into Objects and Classes.
What is a friend function ?
A friend function is a function that is declared outside a class but is capable of accessing the private and protected members of the class. There could be situations in programming wherein we want two classes to share their members. These members may be data members, class functions or function templates. In such cases, we make the desired function, a friend to both these classes which will allow accessing private and protected data members of the class.
Friend Function Syntax:
class className {
... .. ...
friend returnType functionName(arguments);
... .. ...
}
By using the keyword, the ‘friend’ compiler understands that the given function is a friend function.
Advantages of multithreading
1. Enables programmers to do multiple things at one time.
2. Programmers can divide a long program into threads and execute them in parallel which eventually increases the speed of the program execution.
3. Improved performance and concurrency.
4. Simultaneous access to multiple applications .
What is function overriding?
Function overriding is a feature that allows us to have a same function in child class which is already present in the parent class. A child class inherits the data members and member functions of parent class, but when you want to override a functionality in the child class then function overriding can be used.
To override a function , the child class must have the same signature (the data type and sequence of parameters).
1. Two candles and a match box is given, each burning for 1 hour, how to measure 30 minutes.
2. Nine balls are given. All are equally weighed except one that was less weighed. How would we identify the less weighed in two chances?
I introduced myself. Then, he asked about SAP. I told almost everything from its inception to its lasting. Then, he asked why do you want to be in SAP and Why Have you come for this profile. I told everything with reasons .Then, he again asked about a rough idea about my projects and told his profile. He asked me to write an essay of about 200 words of any favorite topic. Then, he asked any question if I wanted to ask him.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?