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 was a proctured online coding test where we had 2 questions to solve under 60 minutes.



1) An element of the ‘COORDINATES’ array is a pair of ‘X' and ‘Y’ coordinates of a point, i.e., COORDINATES[i] = (Xi, Yi).
2) |DISTANCE| represents the absolute value of distance.
3) All points are considered to be connected if there is exactly one simple path between two points.
4) According to Wikipedia, a simple path is a path in a plane that does not have repeating points.
Approach (Using Kruskal's Algo) :
1) First, we will add all the edges (that can be formed by any two points) and their cost in a min-heap.
2) Now, we will process each and every edge present in the min-heap one by one.
3) If the current edge in processing forms a cycle in the MST, then discard the edge; otherwise, include it in the MST. We will be adding the cost of edges included in the MST in an integer variable, ‘result’.
4) The process will be repeated till ‘n - 1’ edges are not included in the MST, where ‘n’ is the number of points in the ‘coordinates’ array. In the end, the ‘result’ will have the cost of MST so formed.
TC : O((N ^ 2) * (log (N)), where ‘N’ is the size of ‘coordinates’ array.
SC : O(N ^ 2)



A pair ('ARR[i]', 'ARR[j]') is said to be an inversion when:
1. 'ARR[i] > 'ARR[j]'
2. 'i' < 'j'
Where 'i' and 'j' denote the indices ranging from [0, 'N').
Approach (Using Merge Sort) :
1) The idea is similar to merge sort, divide the array into two equal or almost equal halves in each step until the base case is reached.
2 )Create a function merge that counts the number of inversions when two halves of the array are merged, create two indices i and j, i is the index for the first half, and j is an index of the second half. if a[i] is greater than a[j], then there are (mid – i) inversions.
3) Create a recursive function to divide the array into halves and find the answer by summing the number of inversions is the first half, the number of inversion in the second half and the number of inversions by merging the two.
4) The base case of recursion is when there is only one element in the given half.
5) Print the answer
TC : O(N*log(N)), where N=size of the array.
SC : O(N)
This round had 1 question of DSA followed by some questions from DBMS and Java. I was also made to execute a SQL query at the end.



Input : 1 -> 2 -> 3 -> 4 -> 'NULL' and 'K' = 2
Output: 1 -> 2 -> 4 -> 'NULL'
Explanation:
After removing the second node from the end, the linked list become 1 -> 2 -> 4 -> 'NULL'.

Approach (Using Slow and Fast Pointers) :
1) Initially, the 'FAST' pointer advances the list by 'K' nodes from the beginning and the 'SLOW' is a pointer to the head of the linked list.
2) Now both pointers are exactly separated by 'K' distance from each other. We will maintain a constant gap by advancing both pointers together until the 'FAST' pointer reaches the last node.
3) When the 'FAST' pointer is at the last node then the 'SLOW' pointer will be at ('K' + 1)th node from the end of the linked list.
4) At last, we will set the next of 'SLOW' pointer to its next of next node.
TC : O(N), where N=number of nodes in the linked list
SC : O(1)
Explain different types of Normalization forms in a DBMS.
Normalization is the process of minimizing redundancy from a relation or set of relations. Redundancy in relation may cause insertion, deletion, and update anomalies. So, it helps to minimize the redundancy in relations. Normal forms are used to eliminate or reduce redundancy in database tables.
Types of Normal Form :
1) 1NF: It is known as the first normal form and is the simplest type of normalization that you can implement in a database. A table to be in its first normal form should satisfy the following conditions:
i) Every column must have a single value and should be atomic.
ii) Duplicate columns from the same table should be removed.
iii) Separate tables should be created for each group of related data and each row should be identified with a unique column.
2) 2NF: It is known as the second normal form. A table to be in its second normal form should satisfy the following conditions:
i )The table should be in its 1NF i.e. satisfy all the conditions of 1NF.
ii) Every non-prime attribute of the table should be fully functionally dependent on the primary key i.e. every non-key attribute should be dependent on the primary key in such a way that if any key element is deleted then even the non_key element will be saved in the database.
3) 3NF: It is known as the third normal form. A table to be in its second normal form should satisfy the following conditions:
i) The table should be in its 2NF i.e. satisfy all the conditions of 2NF.
ii) There is no transitive functional dependency of one attribute on any attribute in the same table.
4) BCNF: BCNF stands for Boyce-Codd Normal Form and is an advanced form of 3NF. It is also referred to as 3.5NF for the same reason. A table to be in its BCNF normal form should satisfy the following conditions:
i) The table should be in its 3NF i.e. satisfy all the conditions of 3NF.
ii) For every functional dependency of any attribute A on B
(A->B), A should be the super key of the table. It simply implies that A can’t be a non-prime attribute if B is a prime attribute.
Write a query that joins two tables A and B having common attribute ID and selects records(ID_NAME) that have matching ID values in both tables .
SELECT A.ID_Name, B.ID_Name
FROM A
INNER JOIN B ON A.ID=B.ID;
Why Java is platform independent and JVM platform dependent?
JVM is platform dependent because it takes java byte code and generates byte code for the current operating system. So Java software is platform dependent but Java language is platform independent because different operating system have different JVMs.
This round had two preety straight forward questions related to DSA and then there were 2 puzzles.



Consider below matrix of characters,
[ 'D', 'E', 'X', 'X', 'X' ]
[ 'X', 'O', 'E', 'X', 'E' ]
[ 'D', 'D', 'C', 'O', 'D' ]
[ 'E', 'X', 'E', 'D', 'X' ]
[ 'C', 'X', 'X', 'E', 'X' ]
If the given string is "CODE", below are all its occurrences in the matrix:
'C'(2, 2) 'O'(1, 1) 'D'(0, 0) 'E'(0, 1)
'C'(2, 2) 'O'(1, 1) 'D'(2, 0) 'E'(3, 0)
'C'(2, 2) 'O'(1, 1) 'D'(2, 1) 'E'(1, 2)
'C'(2, 2) 'O'(1, 1) 'D'(2, 1) 'E'(3, 0)
'C'(2, 2) 'O'(1, 1) 'D'(2, 1) 'E'(3, 2)
'C'(2, 2) 'O'(2, 3) 'D'(2, 4) 'E'(1, 4)
'C'(2, 2) 'O'(2, 3) 'D'(3, 3) 'E'(3, 2)
'C'(2, 2) 'O'(2, 3) 'D'(3, 3) 'E'(4, 3)
Approach :
1)Iterate through the string and keep a count of the given character in a variable ct.
2) If ct==count, strore the index in a variable say idx and break from the loop
3) Final Ans=string.substr(idx)
TC : O(N) , where N=length of the string
SC : O(1)



You are given ‘X’ as 20 and ‘Y’ as 15. The greatest common divisor, which divides both 15 and 20, is 5. Hence the answer is 5.
//Pseudo Code :
int gcd(int a, int b)
{
if (a == 0)
return b;
return gcd(b % a, a);
}
TC : O(log(min(a,b))
SC : O(1)
You have 10 coins….arrange them in 4 straight lines such that each line contains 4 coins, without picking up the pencil.
Answer :
0 0 0 0
0
0
0 0 0 0
This is the required configuration
A lady has 10 bags full of coins. Each bag contains 1000 coins. But one bag is full of forgeries, and she just can’t recall which one. She does know that genuine coins weigh 1 gram, but forgeries weigh 1.1 grams. To hide the fact that she can’t recall which bag contains forgeries, she needs your help. How can she identify the bag with the forgeries with just one weighing?
Approach :
The lady should take out 1 coin from the 1st bag, 2 coins from the 2nd bag, 3 coins from the 3rd bag and similarly 10 coins from the 10th bag.
Now she should simply weigh all these picked coins together.
If there were no forgeries, then the total weight should be (1+2+3+ . . . +10) = 55 grams.
Now, if the total weight comes out to be 55.3 then she can conclude that the 3rd bag contain forgeries. So, if the total weight is (55.n), then it is clear that the nth bag contain forgeries.
This was a typical HR round with some standard Behavioral questions.
Why you want to be a part of Oracle?
Tip 1 : Oracle technologies are modern, cutting edge and built for enterprise requirements (think world class security, availability, performance, scalability, integrated ML/AI and so forth). Oracle Database is #1 worldwide.
Tip 2 : Since it’s inception, Oracle has become a market leader when it comes to database. Oracle has its own all possible solution for it’s clients whether it is into IT or Banking.
Tip 3 : Oracle gives your job sustainability with better career growth - in terms of job profile and package both.

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