Oracle Interview Questions
The questions Oracle actually asks — distilled from 122 real candidate reports and ranked by how often they came up. Search by position, level, location, and interview type, then review coding, system design, and behavioral questions with model answers written by our team.
120
questions tracked
4
positions covered
71
coding problems
122
reports analyzed
Search real candidate reports
Oracle interviews by position
Search by job title, level, location, or a question. Each result is distilled from one public candidate interview report.
121 matching interviews
Software Engineer · IC3
- 01
Find all anagrams of a given string without using sorting.
Coding & Algorithms · Medium
- 02
Sort an array containing only 0s and 1s without using a sorting algorithm.
Coding & Algorithms · Medium
- 03
Design an immutable class with 10 variables where the constructor accepts only 5 parameters.
Object-Oriented Design · Medium
Software Engineer · SDE2
- 01
Build a balanced binary search tree from a given array
Coding & Algorithms · Medium
- 02
Validate whether a binary search tree is valid
Coding & Algorithms · Medium
- 03
Evaluate a postfix expression given as an array of operands and operators
Coding & Algorithms · Medium
Software Engineer · SDE-1
- 01
Reverse a linked list
Coding & Algorithms · Easy
- 02
Identify and prevent deadlock conditions in provided code
System Design · Hard
- 03
Identify operators that cannot be overloaded in the programming language
Object-Oriented Design · Medium
Software Engineer · IC3
- 01
Solve the anagram grouping problem.
Coding & Algorithms · Medium
- 02
Generate random numbers from 1 to 100 without skipping, duplicates, or built-in functions.
Coding & Algorithms · Hard
- 03
Determine which children attempted to take extra sweets during a distribution ceremony.
Coding & Algorithms · Medium
Interview experience
- 01
Simplify a Unix file path according to standard path normalization rules.
Coding & Algorithms · Medium
- 02
Extract all elements from a 2D matrix that is sorted row-wise and column-wise into a single sorted 1D array.
Coding & Algorithms · Hard
Software Engineering Intern
- 01
Solve a medium-difficulty data structures and algorithms problem.
Coding & Algorithms · Medium
- 02
Answer multiple-choice questions on computer science fundamentals, aptitude, and English language skills.
Domain Knowledge · Easy
- 03
Solve a case-based data structures problem and write pseudocode.
Coding & Algorithms · Medium
Software Engineer · IC3
- 01
Remove a node from a binary tree
Coding & Algorithms · Medium
- 02
Validate whether a binary tree is a valid binary search tree
Coding & Algorithms · Medium
- 03
Find and return the left view of a binary tree
Coding & Algorithms · Medium
Software Engineer
- 01
Explain the purpose of wrapper classes for primitive data types in Java.
Object-Oriented Design · Easy
- 02
Determine the output when comparing two String objects created with and without the 'new' keyword using the == operator.
Coding & Algorithms · Easy
- 03
Describe inheritance in Java and explain the different types of inheritance.
Object-Oriented Design · Easy
Most-asked Oracle questions
The questions reported most often across real Oracle interviews, each with a model answer written by our team.
Describe your background, family, and hobbies
I'm a software engineer with [X years] experience building scalable systems at [companies]. I studied [major] because I was fascinated by how software solves real problems. Outside work, I'm passionate about [hobby showing creativity or learning], which taught me [relevant skill like persistence/collaboration]. I'm drawn to Oracle because [specific reason tied to role/company mission], and I'm excited to tackle problems that impact millions of users.
Discuss your current project and technology stack
I'm architecting a real-time data platform using PostgreSQL, Node.js, and Kubernetes that processes millions of events daily. The core challenge was designing for sub-millisecond query latency on terabyte-scale datasets. I optimized through database partitioning, materialized views for critical queries, and implemented a multi-tier caching strategy. This decision reduced p95 latency by 70% and enabled real-time analytics that weren't possible before—directly impacting our product roadmap and business outcomes.
Check if a string of parentheses and brackets is valid and properly balanced.
Use a stack to match brackets. For each opening bracket ((, [, {), push it; for each closing bracket, check if it matches the top of the stack and pop. After processing all characters, the stack must be empty. The key insight: a stack naturally handles nesting since you always match the most recently opened bracket with the current closing one.
Return the k most frequent elements from an array
Build a frequency map for all elements, then maintain a min-heap of size k. Iterate through the frequency map, adding each element to the heap; when the heap exceeds size k, remove the smallest-frequency element. This avoids full sorting—we only track the k best candidates. Extract the k elements from the heap as your result.
Count the number of islands in a grid.
Treat this as a connected components problem. Iterate through the grid; whenever you find an unvisited land cell (1), increment the island count and use DFS (or BFS) to mark all adjacent land cells as visited. The key insight: each DFS traversal identifies exactly one complete island. Return the total count. Efficient because you visit each cell exactly once.
Implement a Least Recently Used (LRU) cache data structure.
Combine a HashMap with a doubly linked list. HashMap maps keys to nodes for O(1) access; the doubly linked list maintains insertion/access order. Most recently used is at the head, least recently used at the tail. On cache hit, move the node to the head. On insertion with full capacity, evict the tail node. This dual-structure approach achieves O(1) get, put, and eviction.
Find two numbers in an array that sum to a target value
Use a hash map to store indices of seen elements. Iterate through the array: for each element, check if target - element exists in the map. If found, return the pair of indices. Otherwise, add the current element to the map. This single-pass approach achieves O(n) time, beating brute-force O(n²). The key insight: trading space for time by enabling constant-time lookups of required complement values.
Merge overlapping intervals into a consolidated list.
Sort intervals by start time, then iterate maintaining a merged result. For each interval, if its start ≤ the last merged interval's end, extend the last interval's end to max(current.end, last.end). Otherwise, add as a new interval. This greedy approach guarantees optimal consolidation in a single pass.
Example: [[1,3],[2,6],[8,10]] → [[1,6],[8,10]]
Design a URL shortener system with focus on API security, HTTP semantics, and encryption methods.
Implement a stateless REST API with OAuth2 authentication and per-user rate limiting. Use consistent hashing (Base62-encoded URL hash + timestamp) or distributed atomic counters for code generation. Store mappings in a replicated KV store (Redis/DynamoDB). Security: enforce HTTPS, encrypt sensitive metadata at-rest, validate/sanitize all URL inputs. HTTP semantics: return 301 permanent redirects with Cache-Control headers for optimal caching. Monitor request patterns for abuse detection. Support optional TTL expiration and custom slug validation for premium tiers.
Explain and demonstrate database normalization with examples
Normalization eliminates data redundancy through systematic decomposition. 1NF ensures atomic values—no repeating groups. 2NF removes partial dependencies: non-key columns depend on the entire primary key. 3NF removes transitive dependencies between non-key columns. Example: an unnormalized table storing student, course, and instructor together causes update anomalies. Normalizing creates Student, Course, and Enrollment tables, where foreign keys reference normalized entities, ensuring data consistency and reducing storage waste.
Why are you interested in working at Oracle
I'm drawn to Oracle's foundational role in enterprise infrastructure—powering mission-critical systems for the world's largest organizations. The technical challenges excite me: optimizing databases at planetary scale, architecting resilient cloud systems, ensuring 99.99%+ uptime. I've followed OCI's technical direction closely, and their approach to solving complex reliability problems aligns with my engineering values. Working here means contributing to systems that directly impact how major enterprises operate globally.
Why are you interested in working for Oracle?
Throughout my career, I've been drawn to solving infrastructure challenges at scale. My research shows Oracle is unmatched in enterprise database and cloud technologies—products that power mission-critical systems for millions globally. I'm excited about Oracle's investment in AI-driven database automation and their commitment to serving enterprises that demand reliability and performance. I want to join a company where my contributions directly impact industry-defining infrastructure and grow alongside world-class engineers tackling distributed systems.
Group anagrams together from a list of words.
Sort each word's characters to create a canonical key—anagrams produce identical sorted strings. Use a hashmap where the key is the sorted form and the value is a list of words. For each word, sort its characters and append it to the corresponding list. Return all grouped lists. The core insight: words are anagrams if and only if their sorted character sequences match.
Calculate how much water can be trapped between elevation bars after raining.
Trapped water at each position equals min(max_left, max_right) − height. Use a two-pointer approach: maintain maximums from both ends, advance the pointer with smaller maximum inward, and accumulate water. This works because the bottleneck is always the smaller side's max—the taller side has sufficient capacity. Precomputing left/right maximums is an alternative. Both achieve O(n) time; two-pointer uses O(1) extra space versus O(n) for the array approach.
Discuss your internship experience in detail.
During my internship, I took ownership of a backend API optimization project. I profiled database queries, identified N+1 patterns, and implemented intelligent caching—delivering a 40% latency reduction in production. Beyond the code, I documented the approach and mentored peers. The key insight: technical excellence only matters if it drives business value and you communicate it clearly. I bring this ownership mindset everywhere because Oracle's enterprise scale demands engineers who think beyond their sprint.
Find the length of the longest valid parentheses substring.
Use dynamic programming where dp[i] represents the longest valid parentheses ending at index i. For each closing bracket, check if it matches an opening bracket and extend any previously valid sequence ending just before that pair. The key insight is that valid substrings can be chained: if we have a valid substring ending at i-1 and position i forms a pair, we add 2 to that length plus any valid substring before the pair.
What are your key strengths and weaknesses?
My key strength is breaking down complex problems systematically—I ask clarifying questions, propose solutions, and own outcomes end-to-end. A genuine weakness I'm actively addressing is perfectionism; early in my career, I'd over-engineer solutions at the expense of velocity. I've learned to balance craftsmanship with pragmatism, shipping incrementally and iterating on real feedback. Oracle values shipping products efficiently, and I'm deliberately building that discipline—recognizing that "done and shipping" often beats "perfect but delayed."
Replace each array element with the product of all other elements
Build a result array where each element equals the product of all others. Compute left products (everything before index i) and right products (everything after), then multiply them for each position. Key insight: avoid division—it fails with zeros and is less elegant. Two passes accumulating products left-to-right and right-to-left solves this cleanly. If space is constrained, use the output array itself to store left products, then compute right products on the second pass.