Oracle Senior Software Engineer(IC3) interview experience

oracle logo
oracle
· Senior Software Engineer (IC3)
September 15, 2026 · 3 reads

Summary

I interviewed for a Senior Software Engineer (IC3) role at Oracle. The interview consisted of a DSA round where I solved a problem about counting distinct infection sequences.

Full Experience

Recruiter reached out through linkedin and scheduled an interview after a week

Round 1 - DSA

Given n houses numbered from 0 to n-1, arranged in a straight line.

You are given an array infected containing the houses that are initially infected on Day 0.

Every infected house can infect its immediate neighbors:

• House i can infect house i - 1 • House i can infect house i + 1

A house that becomes infected on Day d can infect its neighbors starting on Day d + 1.

The infection continues until all houses that can be infected have become infected.

Two infection outcomes are considered different if the sequence in which the houses become infected is different.

Given n and the initially infected houses, return the number of distinct possible infection sequences.

Since the answer can be very large, return it modulo 10^9 + 7.

Example 1:

n = 5
infected = [2]

The infection spreads as:

Day 0:       2
Day 1:     1   3
Day 2:   0       4

The infection days are uniquely determined:

[2, 1, 3, 0, 4]

However, if the ordering of houses infected on the same day is considered, houses 1 and 3 can appear in either order, and similarly 0 and 4.

Possible sequences:

[2, 1, 3, 0, 4]
[2, 1, 3, 4, 0]
[2, 3, 1, 0, 4]
[2, 3, 1, 4, 0]

Answer: 4

Example 2:

n = 6
infected = [2, 4]

The infection spreads simultaneously from the initially infected houses, and we need to count all distinct valid sequences of infection.

Note: I was required to run the code and pass all test cases in hackerrank.

Interview Questions (1)

1.

Count Distinct Infection Sequences

Data Structures & Algorithms

Given n houses numbered from 0 to n-1 arranged in a straight line and an array infected of initially infected houses on Day 0, each infected house can infect its immediate neighbors (i-1 and i+1) starting the next day. The infection spreads until no more houses can be infected. Two infection outcomes are considered different if the sequence in which the houses become infected differs. Return the number of distinct possible infection sequences modulo 10^9 + 7.

Example 1

n = 5
infected = [2]

Possible sequences:

[2, 1, 3, 0, 4]
[2, 1, 3, 4, 0]
[2, 3, 1, 0, 4]
[2, 3, 1, 4, 0]

Answer: 4

Example 2

n = 6
infected = [2, 4]

(Count all valid infection sequences.)

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!