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.
The test included MCQ questions from SQL, Linux Commands, C/C++ programming, Logical Reasoning, Aptitude
questions. The other section was the coding round, where 2 SQL queries and 2 coding questions were there.



1. The integers x,y and z might not be distinct , but they should be present at different locations in the array i.e if a[i] = x, a[j] = y and a[k] = z, then i,j and k should be pairwise distinct.
2. The integers a,b and c can be present in any order in the given array.
Approach :
1) I solved it in O(N^2) approach .
2) Sort the array
3) Initially map all the elements of the array to their index in a Hash Map or a Hash Set
4) Now , run 2 for loops and for every x^2 + y^2 ,check if there exists a z^2 s.t x^2+y^2=z^2 and the index of z^2 is different than both the indices of x and y


For the input string 'abcab', the first non-repeating character is ‘c’. As depicted the character ‘a’ repeats at index 3 and character ‘b’ repeats at index 4. Hence we return the character ‘c’ present at index 2.
Approach :
1) Make a count array and initialize all characters by -1, i.e., all considered as absent.
2) Traverse the given string, and the value of count[x] will be the index of ‘x’ if ‘x’ appears only once. Else, the value is going to be either -1 or -2.
3) Now, traverse the count array and check if the ith character occurs only once (count[i] has a positive value) and appears before the current result, then update the result.
4) Add the character present at the result index in the arraylist.
This was a standard DSA round where I was asked to solve 2 questions and also code it in a production ready manner . After DS and Algo , I was asked some questions from OOPS and Java followed by some Unix Commands and basic concepts from Operating Systems.



1. All the elements are in the range 0 to N - 1.
2. The elements may not be in sorted order.
3. You can return the duplicate elements in any order.
4. If there are no duplicates present then return an empty array.
Approach 1 (Using Sorting) :
Steps :
1) Sort the array first
2) Check if adjacent elements are same or not .
TC : O(N*log(N))
SC : O(1)
Approach 2 (Time Efficient using Hash Map) :
Steps :
1) Take An unordered_map to store frequency of each element .
2) Now return those elements having frequency 2
TC : O(N)
SC: O(N)
Approach 3 (Time as well as Space Efficient) :
Steps :
1) Traverse the array from start to end.
2) For every element,take its absolute value and if the abs(array[i])‘th element is positive, the element has not encountered before, else if negative the element has been encountered before print the absolute value of the current element.
TC : O(N)
SC : O(1)



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
Iterative(Without using stack):
1) Initialize three pointers prev as NULL, curr as head and next as NULL.
2) Iterate through the linked list. In loop, do following.
// Before changing next of current,
// store next node
next = curr->next
// Now change next of current
// This is where actual reversing happens
curr->next = prev
// Move prev and curr one step forward
prev = curr
curr = next
3)Finally the prev pointer contains our head , i,e. ,head=prev .
TC : O(n)
SC: O(1)
Recursive:
1) Divide the list in two parts - first node and rest of the linked list.
2) Call reverse for the rest of the linked list.
3) Link rest to first.
4) Fix head pointer
TC:O(n)
SC:O(n)
Iterative(Using Stack):
1) Store the nodes(values and address) in the stack until all the values are entered.
2) Once all entries are done, Update the Head pointer to the last location(i.e the last value).
3) Start popping the nodes(value and address) and store them in the same order until the stack is empty.
4) Update the next pointer of last Node in the stack by NULL.
TC: O(n)
SC:O(n)
What is Serialization and Deserialization in Java ?
Answer :
1) Serialization in Java is a mechanism of writing the state of an object into a byte-stream. It is mainly used in Hibernate, RMI, JPA, EJB and JMS technologies.
2) The reverse operation of serialization is called deserialization where byte-stream is converted into an object.
3) The serialization and deserialization process is platform-independent, it means you can serialize an object on one platform and deserialize it on a different platform.
4) For serializing the object, we call the writeObject() method of ObjectOutputStream class, and for deserialization we call the readObject() method of ObjectInputStream class.
5) Only the objects of those classes can be serialized which are implementing java.io.Serializable interface.
6) Serializable is a marker interface (has no data member and method). It is used to “mark” java classes so that objects of these classes may get certain capability. Other examples of marker interfaces are:- Cloneable and Remote.
Advantages of Serialization :
1) To save/persist state of an object.
2) To travel an object across a network.
Important Points to remember while implementing Serializable interface :
1) If a parent class has implemented Serializable interface then child class doesn’t need to implement it but vice-versa is not true.
2) Only non-static data members are saved via Serialization process.
3) Static data members and transient data members are not saved via Serialization process.So, if you don’t want to save value of a non-static data member then make it transient.
4) Constructor of object is never called when an object is deserialized.
5) Associated objects must be implementing Serializable interface.
Explain Singleton Class in Java
Answer :
1) In object-oriented programming, a singleton class is a class that can have only one object (an instance of the class) at a time.
2) After first time, if we try to instantiate the Singleton class, the new variable also points to the first instance created.
3) So whatever modifications we do to any variable inside the class through any instance, it affects the variable of the single instance created and is visible if we access that variable through any variable of that class type defined.
The key points while defining class as singleton class are :
1) Make constructor private.
2) Write a static method that has return type object of this singleton class. Here, the concept of Lazy initialization is used to write this static method.
1) Write command in the terminal to check the kernel version .
2) Check the system hardware in Linux .
3) What are the contents of /etc
1) uname –a : is a command to check kernel version of Linux OS.
2) cat /proc/cpuinfo
3) /etc: – It contain all configuration file and directory used for server.
Explain Piping in Unix/Linux
Answer :
1) A pipe is a form of redirection (transfer of standard output to some other destination) that is used in Linux and other Unix-like operating systems to send the output of one command/program/process to another command/program/process for further processing.
2) The Unix/Linux systems allow stdout of a command to be connected to stdin of another command. We can make it do so by using the pipe character ‘|’.
3) Pipe is also used to combine two or more commands, and in this, the output of one command acts as input to another command, and this command’s output may act as input to the next command and so on.
4) It can also be visualized as a temporary connection between two or more commands/ programs/ processes. The command line programs that do the further processing are referred to as filters.
Examples :
1) Listing all files and directories and give it as input to more command.
$ ls -l | more
2) Use sort and uniq command to sort a file and print unique values.
$ sort record.txt | uniq
3) Use head and tail to print lines in a particular range in a file.
$ cat sample2.txt | head -7 | tail -5
This was a typical HR round with some standard Behavioral questions .
Tell me something not there in your resume.
If you get this question, it's an opportunity to choose the most compelling information to share that is not obvious from your resume.
Example :
Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me unique from others.
Ability to handle Pressure -> I enjoy working under pressure because I believe it helps me grow and become more efficient .
Tip : Emphasize why you were inspired to apply for the job. You can also explain that you are willing to invest a great deal of energy if hired.
These are generally very open ended questions and are asked to test how quick wit a candidate is. So there is nothing to worry about if you have a good cammand over your communication skills and you are able to propagate your thoughts well to the interviewer.

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?