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

SDE - 1

Oracle
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Journey
My preparation journey began during my early years at IIT Guwahati, where I focused on building a rock-solid foundation in Data Structures and Algorithms. However, I soon realized that for a company like Oracle, being a good coder is only half the battle; you need to be a strong computer scientist. Starting in August, I shifted my focus toward the 'Core Four': Operating Systems, DBMS, Computer Networks, and Object-Oriented Programming. I spent weeks diving into the internals of indexing, transaction management, and memory allocation, which I knew were critical for Oracle’s engineering culture. The process kicked off with a challenging Online Assessment (OA) that tested not just coding, but also my speed in aptitude and core CS theory. Clearing that was a major confidence booster. The transition to the interview rounds was intense but rewarding. I treated each round as a technical deep dive with a senior peer, moving from whiteboard algorithmic solutions to discussing how my code would actually interact with the database and system memory.
Application story
I applied for the Software Engineering role through the on-campus placement drive at IIT Guwahati. The process officially began in August with a pre-placement talk that outlined Oracle's technical vision. About a week after I submitted my resume through the T&P portal, I was invited to the Online Assessment (OA).
Why selected/rejected for the role?
I was unfortunately rejected for this role because I did not perform as well as required in the Online Assessment (OA). While my coding skills were solid, the Oracle OA is unique because it places a high weight on speed and breadth across Core CS fundamentals.
Preparation
Duration: 3 - 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Practice at least 250 questions.

Tip 2: Do at least 2 projects.

Tip 3: Be confident in system design.

Application process
Where: Campus
Eligibility: No criteria, (Salary Package - 61 LPA)
Resume Tip
Resume tip

Tip 1: Have some projects on your resume.

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

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 minutes
Interview date4 Nov 2025
Coding problem2

1. Find a value whose XOR with a given value is maximum.

Easy
20m average time
80% success
0/40
Asked in companies
OptumOracleUrban Company (UrbanClap)

You are given an integer 'X' and your task is to find an integer 'Y' such that the bitwise XOR of the integers 'X' and 'Y' give the maximum possible value. The integer 'Y' should not be greater than 2305843009213693951 ((2^61) - 1).

A bitwise XOR is a binary operation that takes two bit patterns of equal length and performs the logical exclusive OR operation on each pair of corresponding bits. The result in each position is 1 if only one of the bits is 1, but will be 0 if both are 0 or both are 1.

Note:

1. The maximum obtainable value can always be stored in 64-bit memory space.
2. The given number 'X' is always non-negative.
Problem approach

Step 1: Analyze Bit by Bit

Iterate through the bits from the most significant bit (n−1) down to 0. For each bit position i, there are two main scenarios for the bits of x and y at that position (xi​ and yi​):

Case 1: xi​==yi​
In this case, no matter what bit we choose for zi​, the resulting bits in A and B will be the same (xi​⊕zi​). To maximize the product, we want both numbers to be as large as possible. Therefore, we choose zi​ such that it flips the bits of x and y to 1.

If xi​=0, set zi​=1→ both become 1.

If xi​=1, set zi​=0→ both become 1.

Case 2: xi​=yi​
In this case, one of the resulting bits in A or B will be 1, and the other will be 0, regardless of whether we pick zi​=0 or zi​=1. This is where the "balancing" strategy comes in.

Step 2: The "First Difference" Strategy

The very first time we encounter Case 2 (xi​=yi​), we have a choice. To maximize the product, we should give this high-value bit (2i) to the number that is currently smaller.

If both are currently equal, give it to either one (let's say A).

Once one number (e.g., A) has "taken" a 1 at a higher bit, it is now strictly larger than B.

Step 3: Balance the Remaining Bits

For all subsequent instances of Case 2 (xj​=yj​ where jSince A is already larger than B due to the bit at position i, we should give all following 1 bits to B to keep the two numbers as close together as possible (minimizing their difference).

Set zj​ such that the bit in B becomes 1 and the bit in A becomes 0.

Step 4: Calculate the Final Product

After determining all bits of z, calculate A=(x⊕z) and B=(y⊕z). Compute (A⋅B)(mod109+7). Be careful to use long long for the multiplication before the modulo.

Try solving now

2. Distinct Subsequences

Easy
0/40
Asked in companies
AmazonOracleMicrosoft

Given two strings S and T consisting of lower case English letters. The task is to count the distinct occurrences of T in S as a subsequence.

A subsequence is a sequence generated from a string after deleting some or no characters of the string without changing the order of the remaining string characters. (i.e. “ace” is a subsequence of “abcde” while “aec” is not).

For example, for the strings S = “banana” and T=”ban”, output is 3 as T appears in S as below three subsequences.

[ban], [ba n], [b an ]

Problem approach

Step 1: Define the DP Table

Create a 2D array dp[i][j] where:

i represents the prefix of string s of length i.

j represents the prefix of string t of length j.

dp[i][j] stores the number of ways to form the prefix t[0…j−1] using characters from the prefix s[0…i−1].

Step 2: Initialize Base Cases

If t is empty: An empty string is a subsequence of any string exactly once. So, dp[i][0] = 1 for all i.

If s is empty (and t is not): You cannot form a non-empty string from an empty one. So, dp[0][j] = 0 for all j>0.

Step 3: Establish Transitions

Iterate through s from 1 to n and t from 1 to m. For each pair (i,j):

If s[i−1]=t[j−1]: The current character in s cannot be used to match the current character in t. We must carry over the count from the previous prefix of s:
dp[i][j]=dp[i−1][j]

If s[i−1]==t[j−1]: We have two choices:

Use s[i−1] to match t[j−1]: Look for the prefix t[0…j−2] in s[0…i−2] → dp[i-1][j-1].

Don't use s[i−1]: Look for the current prefix t[0…j−1] in the previous prefix s[0…i−2] → dp[i-1][j].

Total: dp[i][j]=(dp[i−1][j−1]+dp[i−1][j])(mod109+7).

Step 4: Space Optimization (Optional)

Since dp[i][j] only depends on the previous row (i-1), you can optimize the space to O(∣t∣) by using a 1D array and iterating backwards to avoid overwriting values from the current iteration.

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

Which traversal uses a queue as its primary data structure?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 2 problems
Interviewed by Oracle
10889 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
3 rounds | 6 problems
Interviewed by Oracle
3059 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Oracle
1769 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115829 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58801 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35417 views
7 comments
0 upvotes