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.
This round had 2 coding questions of Easy to Medium level of difficulty followed by some more questions from OOPS.



The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

Approach :
1) Calculate the length of both the lists, say len1 and len2
2) Get the absolute difference of the lengths, diff = |len1 – len2|
3) Now traverse the long list from the first node till ‘diff’ nodes so that from there onwards both the lists have equal
number of nodes
4) Then traverse both the lists in parallel and check whether a common node is reached (Note that getting a common
node is done by comparing the address of the nodes, not the data)
4.1) If yes, return that node’s data
4.2) If no, return -1
TC : O(N) , where N = max length of the linked list
SC : O(1)




Approach :
spiralPrint(matrix[][], R, C, rows, cols):
1) Check for base cases, i.e. if outside the boundary of the matrix then return.
2) Print the first row from left to right of the matrix i.e from column ‘C’ to ‘cols’, print the elements of the Rth row.
3) Print the last column from top to bottom of the matrix i.e from row ‘R’ to ‘rows’, print the elements of the (cols)th
column.
4) Print the last row from right to left of the matrix i.e from column ‘cols’ to ‘C’, print the elements of the (rows)th row.
5) Print the first column from bottom to top of the matrix i.e from row ‘rows’ to ‘R’, print the elements of the Cth
column.
6) Call the function recursively with the updated values of boundaries, spiralPrint(matrix, R + 1, C + 1, rows - 1, cols -
1).
TC : O(N*M) , where N = number of rows and M = number of columns of the matrix.
SC : O(max(N,M))
When can you use super keyword?
The super keyword is used to access hidden fields and overridden methods or attributes of the parent class.
Following are the cases when this keyword can be used :
1) Accessing data members of parent class when the member names of the class and its child subclasses are same.
2) To call the default and parameterized constructor of the parent class inside the child class.
3) Accessing the parent class methods when the child classes have overridden them.
What do you mean by data encapsulation?
1) Data Encapsulation is an Object-Oriented Programming concept of hiding the data attributes and their behaviors in
a single unit.
2) It helps developers to follow modularity while developing software by ensuring that each object is independent of
other objects by having its own methods, attributes, and functionalities.
3) It is used for the security of the private properties of an object and hence serves the purpose of data hiding.
This round started with 2 coding questions - the first one was related to Binary Tree and the second one was a simple questions related to Number Theory. After that, I was some questions related to DBMS towards the end of the interview.


For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
1
/ \
2 3
/ \
4 5
Output: 1 3 2 4 5
Approach :
1) We will maintain two stacks, one for each direction i.e. leftToRight and rightToleft.
2) We will do a level order traversal of the given binary tree and push nodes of each level onto one of the stack
according to the current direction of traversal.
3) After we’ve pushed all nodes of a level onto one stack, we’ll start popping those nodes. While popping the nodes
we will push their children (if any) onto our other direction stack, so that the next level be traversed in reverse order.
TC : O(N), where N=number of nodes in the binary tree
SC : O(N)



Approach (Using Sieve of Eratosthenes) :
1) First, we will make a boolean array/list isPrime of size N + 1. This will mark if a number is prime or not. Initially, all
values will be true.
2) Then, we initialize a variable num equal to 2 which represents the current processing prime number.
3) We will loop as num from 2 to N^½:
3.1) If num is not prime, we continue.
3.2) Else, we will mark all multiples of num in isPrime as false.
4) In the end, we will iterate through isPrime and store all primes in the result vector/list.
5) Finally, we return the result vector.
TC : O(N * log(log N)), where N is the given positive integer.
SC : O(N)
Explain Left Outer Join and Right Outer Join.
LEFT JOIN :
The LEFT JOIN or the LEFT OUTER JOIN returns all the records from the left table and also those records which
satisfy a condition from the right table. Also, for the records having no matching values in the right table, the output or
the result-set will contain the NULL values.
Syntax:
SELECT Table1.Column1,Table1.Column2,Table2.Column1,....
FROM Table1
LEFT JOIN Table2
ON Table1.MatchingColumnName = Table2.MatchingColumnName;
RIGHT JOIN :
The RIGHT JOIN or the RIGHT OUTER JOIN returns all the records from the right table and also those records
which satisfy a condition from the left table. Also, for the records having no matching values in the left table, the
output or the result-set will contain the NULL values.
Syntax:
SELECT Table1.Column1,Table1.Column2,Table2.Column1,....
FROM Table1
RIGHT JOIN Table2
ON Table1.MatchingColumnName = Table2.MatchingColumnName;
Difference between Primary key and Unique key
Primary Key : Used to serve as a unique identifier for each row in a table.
Unique Key : Uniquely determines a row which isn’t primary key.
Key Differences Between Primary key and Unique key :
1) Primary key will not accept NULL values whereas Unique key can accept NULL values.
2) A table can have only one primary key whereas there can be multiple unique key on a table.
3) A Clustered index automatically created when a primary key is defined whereas Unique key generates the non-
clustered index.
What is meant by normalization and denormalization?
NORMALIZATION :
1) Normalization is a process of reducing redundancy by organizing the data into multiple tables.
2) Normalization leads to better usage of disk spaces and makes it easier to maintain the integrity of the database.
DENORMALIZATION :
1) Denormalization is the reverse process of normalization as it combines the tables which have been normalized into
a single table so that data retrieval becomes faster.
2) JOIN operation allows us to create a denormalized form of the data by reversing the normalization.
This was a typical HR round with some standard Behavioral questions.
Tell me something about yourself?
Tip 1 : Prepare the points that you will speak in your introduction prior to the interview.
Tip 2 : Tell about your current cgpa, achievements and authenticated certification
Tip 3 : I told about my role in current internship and what all I do
Why should we hire you ?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round,
like what are the projects currently the company is investing, which team you are mentoring. How all is the work
environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical
questions. No coding in most of the cases but some discussions over the design can surely happen.

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