Oracle interview experience Real time questions & tips from candidates to crack your interview

Application Developer

Oracle
upvote
share-icon
4 rounds | 11 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

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.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

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.

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 Minutes
Interview date16 Jun 2021
Coding problem2

This was a proctured online coding test where we had 2 questions to solve under 60 minutes.

1. Minimum Cost to Connect All Points

Moderate
30m average time
70% success
0/80
Asked in companies
MicrosoftOracleAmazon

You are given an array, ‘COORDINATES’ that represents the integer coordinates of some points on a 2D plane. Your task is to find the minimum cost to make all the points connected where the cost of connecting two points: (x1, y1) and (x2, y2) is equal to the manhattan distance between them, i.e., |x1 - x2| + |y1 - y2|.

Note:

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.
Problem approach

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)

Try solving now

2. Count Inversions

Moderate
40m average time
55% success
0/80
Asked in companies
MicrosoftAdobeSamsung R&D Institute

For a given integer array/list 'ARR' of size 'N' containing all distinct values, find the total number of 'Inversions' that may exist.

An inversion is defined for a pair of integers in the array/list when the following two conditions are met.

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').
Problem approach

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)

Try solving now
02
Round
Medium
Video Call
Duration60 Minutes
Interview date16 Jun 2021
Coding problem4

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.

1. Delete Kth node From End

Moderate
15m average time
95% success
0/80
Asked in companies
WalmartWells FargoChegg Inc.

You have been given a singly Linked List of 'N' nodes with integer data and an integer 'K'.


Your task is to remove the 'K'th node from the end of the given Linked List and return the head of the modified linked list.


Example:
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'.

altImage


Problem approach

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)

Try solving now

2. DBMS Question

Explain different types of Normalization forms in a DBMS.

Problem approach

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.

3. SQL Question

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 .

Problem approach

SELECT A.ID_Name, B.ID_Name
FROM A
INNER JOIN B ON A.ID=B.ID;

4. Java Question

Why Java is platform independent and JVM platform dependent?

Problem approach

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.

03
Round
Medium
Video Call
Duration60 Minutes
Interview date16 Jun 2021
Coding problem4

This round had two preety straight forward questions related to DSA and then there were 2 puzzles.

1. Find all occurrences

Moderate
35m average time
60% success
0/80
Asked in companies
Goldman SachsMicrosoftOracle

You are given a 'M' x 'N' matrix of characters, 'CHARACTER_MATRIX' and a string 'WORD'. Your task is to find and print all occurrences of the string in the given character matrix. You are allowed to search the string in all eight possible directions, i.e. North, South, East, West, North-East, North-West, South-East, South-West.

Note: There should not be any cycle in the output path. The entire string must lie inside the matrix boundary. You should not jump across boundaries, i.e. from row 'N' - 1 to 0 or column 'N' - 1 to 0 or vice versa.

Example:

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)
Problem approach

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)

Try solving now

2. Greatest Common Divisor

Easy
15m average time
85% success
0/40
Asked in companies
OracleGoldman SachsDell Technologies

You are given two numbers, ‘X’ and ‘Y’. Your task is to find the greatest common divisor of the given two numbers.

The Greatest Common Divisor of any two integers is the largest number that divides both integers.

For Example:
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.
Problem approach

//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)

Try solving now

3. Puzzle

You have 10 coins….arrange them in 4 straight lines such that each line contains 4 coins, without picking up the pencil.

Problem approach

Answer :

0 0 0 0
0
0
0 0 0 0

This is the required configuration

4. Puzzle

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?

Problem approach

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.

04
Round
Easy
HR Round
Duration30 Minutes
Interview date16 Jun 2021
Coding problem1

This was a typical HR round with some standard Behavioral questions.

1. Basic HR Question

Why you want to be a part of Oracle?

Problem approach

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
Application Developer
4 rounds | 12 problems
Interviewed by Oracle
1190 views
0 comments
0 upvotes
company logo
Application Developer
4 rounds | 12 problems
Interviewed by Oracle
920 views
0 comments
0 upvotes
company logo
Application Developer
4 rounds | 4 problems
Interviewed by Oracle
5168 views
0 comments
0 upvotes
company logo
Application Developer
3 rounds | 4 problems
Interviewed by Oracle
1786 views
0 comments
0 upvotes