oracle logo
Oracle· software role

Oracle Interview DS questions

Posted
1 Apr 2025
323 reads

Summary

I recently interviewed with Oracle for a software role, and it was a great learning experience where I encountered several coding questions testing my problem-solving skills, data structures, and algorithmic thinking.

How it went

I recently had the opportunity to interview with Oracle for a software role, and it was a great learning experience! Here are some of the coding questions I encountered during the process:

1️⃣ Remove the minimum number of parentheses for a valid string

Given a string containing parentheses, the goal is to remove the minimum number of invalid parentheses to make the string valid. Hint:-The solution requires efficient use of stacks or DFS.
2️⃣ Stock Price Tracker

You are given a stream of records about a particular stock. Each record contains a timestamp and the corresponding price of the stock at that timestamp. You need to implement the Stock Price class that supports the following operations:
Update the price of the stock at a given timestamp.
Retrieve the latest stock price (price at the latest timestamp recorded).
Retrieve the maximum stock price recorded so far.
Retrieve the minimum stock price recorded so far.
Hint:-This problem can be efficiently solved using a combination of hash maps and priority queues.

3️⃣ Maximum Path Sum in a Binary Tree

Given a binary tree, find the path with the maximum sum. The path can start and end at any node.
Hint:- The solution involves a depth-first search (DFS) traversal while keeping track of the maximum sum encountered.

These questions tested my problem-solving skills, data structures, and algorithmic thinking. Overall, it was a great experience!

If you’re preparing for coding interviews, I highly recommend practicing these types of questions. Feel free to drop a comment if you have any thoughts or if you’ve faced similar challenges in your interviews!

#Oracle #InterviewExperience #CodingInterview #DataStructures #Algorithms #SoftwareEngineering

Questions asked (3)

  1. 01

    Remove Minimum Number of Parentheses for Valid String

    Data Structures & Algorithms

    Given a string containing parentheses, the goal is to remove the minimum number of invalid parentheses to make the string valid. Hint:-The solution requires efficient use of stacks or DFS.

  2. 02

    Stock Price Tracker

    Data Structures & Algorithms

    You are given a stream of records about a particular stock. Each record contains a timestamp and the corresponding price of the stock at that timestamp. You need to implement the Stock Price class that supports the following operations:
    Update the price of the stock at a given timestamp.
    Retrieve the latest stock price (price at the latest timestamp recorded).
    Retrieve the maximum stock price recorded so far.
    Retrieve the minimum stock price recorded so far.
    Hint:-This problem can be efficiently solved using a combination of hash maps and priority queues.

  3. 03

    Maximum Path Sum in a Binary Tree

    Data Structures & Algorithms

    Given a binary tree, find the path with the maximum sum. The path can start and end at any node. Hint:- The solution involves a depth-first search (DFS) traversal while keeping track of the maximum sum encountered.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Oracle recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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