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

SDE - 1

Oracle
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
Navigating from a B.Tech at NSUT to becoming a software developer has been a dynamic progression. I started with foundational programming languages and then delved into complex concepts through hands-on projects, refining my skills.
Application story
I applied for a software developer position when the company visited my campus for placements. After submitting my resume through the campus portal, I completed pre-interview assessments that focused on showcasing my technical skills.
Why selected/rejected for the role?
I was rejected for this offer because I could not perform well during all the rounds of the interview process.
Preparation
Duration: 8 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Practiced topic-wise CodeStudio questions from the basics.

Tip 2: Watched numerous system design mock interviews.

Tip 3: Conducted mock interviews with friends for DSA and system design rounds.

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

Tip 1: Include some projects on your resume.

Tip 2: Do not include false information on your resume.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date30 Sep 2022
Coding problem2

1. Sum Of Max And Min

Easy
10m average time
90% success
0/40
Asked in companies
SAP LabsOracleFlexiEle Consulting Services (FE)

You are given an array “ARR” of size N. Your task is to find out the sum of maximum and minimum elements in the array.

Follow Up:
Can you do the above task in a minimum number of comparisons?
Problem approach

This can be solved by simply traversing the array once and updating the max and min by comparing it with every element. Steps :
1. Initialize min and max with the value of the first element of the array 
2. Run a loop from index 1 to n-1 :
For every element, compare it with max and min. Update max and min accordingly. 
This approach has O(n) time complexity and O(1) auxiliary space.

Try solving now

2. Binary Tree From Bracket

Easy
10m average time
90% success
0/40
Asked in companies
OracleIBM

You are given a string ‘str’ which consists of brackets and integers ∈ [1, 9]. Your task is to construct a binary tree from the given string and return the Pre-Order Traversal of it.

The rules are as follows

1. The first character of the string is guaranteed to be an integer which denotes the root element of the tree.

2. This is followed by zero, one or two pairs of parenthesis, which contains a child binary tree with the same structure.

3. The first parenthesis denotes the left child of the binary then the right child.
For Example
Let str= “1(2)(3)”

The tree will be:

img-2

The first element i.e 1 is the root node and the first bracket signifies the left child of the root node which has only 1 element i.e 2 and the second bracket signifies the right child of the root node that has only 1 node i.e 3 . Hence we have the binary tree as shown above.
Problem approach

The idea here is to repeatedly find out the children of a particular node, attach them with their 'PARENT' node and work on the child nodes separately. 

This can be achieved by:- 

Find out the 'ROOT' node by searching for ‘-1’ in the given 'PARENT' array. Pass this 'ROOT' node as well as the 'PARENT' array into a helper function. The helper function returns us the final 'ROOT' of the binary tree by doing the following things:- If the 'ROOT' is 'NULL', i.e. we are given the 'PARENT' array of a 'NULL' tree, returns 'NULL'. Otherwise, traverses the 'PARENT' array and finds out the children of the current 'ROOT'. Let us store 'LEFT' child in 'FIRST' and 'RIGHT' child in Second. Assigns 'FIRST' to the 'LEFT' child of 'ROOT' and recursively calls for the creation of subtree which has 'FIRST' as its 'ROOT'. Assigns Second to the 'RIGHT' child of 'ROOT' and recursively calls for the creation of subtree which has Second as its 'ROOT'. Return the 'ROOT' fetched from the helper function.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date2 Oct 2022
Coding problem2

1. Next Permutation

Moderate
15m average time
85% success
0/80
Asked in companies
UberAdobeCultfit

You have been given a permutation of ‘N’ integers. A sequence of ‘N’ integers is called a permutation if it contains all integers from 1 to ‘N’ exactly once. Your task is to rearrange the numbers and generate the lexicographically next greater permutation.

To determine which of the two permutations is lexicographically smaller, we compare their first elements of both permutations. If they are equal — compare the second, and so on. If we have two permutations X and Y, then X is lexicographically smaller if X[i] < Y[i], where ‘i’ is the first index in which the permutations X and Y differ.

For example, [2, 1, 3, 4] is lexicographically smaller than [2, 1, 4, 3].

Problem approach

Here, we need to find the next permutation of an array like this 
For example, [2, 1, 3, 4] is lexicographically smaller than [2, 1, 4, 3].

Try solving now

2. Next Smaller Element

Moderate
25m average time
75% success
0/80
Asked in companies
IBMAmazonWalmart

You are given an array 'ARR' of integers of length N. Your task is to find the next smaller element for each of the array elements.

Next Smaller Element for an array element is the first element to the right of that element which has a value strictly smaller than that element.

If for any array element the next smaller element does not exist, you should print -1 for that array element.

For Example:

If the given array is [ 2, 3, 1], we need to return [1, 1, -1]. Because for  2, 1 is the Next Smaller element. For 3, 1 is the Next Smaller element and for 1, there is no next smaller element hence the answer for this element is -1.
Problem approach

I used the stack concept to solve this question.

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date3 Oct 2022
Coding problem1

1. Leftmost & Rightmost Nodes of Binary Tree

Easy
20m average time
80% success
0/40
Asked in companies
Disney + HotstarOracleAdobe

You are given an arbitrary binary tree with N nodes, whose nodes have their values in the range of integers. You have to print the values of leftmost and rightmost nodes at each level of the given tree. In other words, for every level in the given tree, print the values of corner nodes.

Two nodes are said to be at the same level if they are at the same distance from the root node.

Note:

1. For all such levels where there is only one corner node the leftmost and the rightmost nodes are the same.
2. In the output, you have to print the leftmost and rightmost values in level order fashion i.e, the leftmost node of level1 followed by the rightmost node of level1 followed by the leftmost node of level2 followed by the rightmost node of level2 and so on.
Problem approach

Using level-order traversal, we will maintain a queue to store the pending nodes for traversal. Starting from the 0th level (i.e., the root node), we add the root node to the queue. For each level stored in the queue (initially, we have only the 0th level), we will poll nodes one by one from the queue and add their corresponding children to the queue. While polling nodes, we will also print the first (leftmost) and last (rightmost) nodes of that level. This way, we will have the next level pending in our queue to traverse. This process continues until the last level is traversed. The approach is outlined in the algorithm below.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 2 problems
Interviewed by Oracle
10749 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Oracle
0 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 10 problems
Interviewed by Oracle
6836 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Oracle
3010 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes