Interview Experience at Oracle
1. Brief Introduction
I started the interview with a quick introduction about myself, my background, and my experience working with Java and data structures and algorithms.
2. Java/OOP Questions
The interviewer asked several Java questions centered around the four pillars of Object-Oriented Programming:
- Encapsulation
- Abstraction
- Inheritance
- Polymorphism
3. Data Structures & Algorithms (DSA) Questions
-
LeetCode 179: Largest Number
- Problem: Given a list of non-negative integers, arrange them such that they form the largest number.
- Link: LeetCode 179 – Largest Number
-
Symmetric Tree Check
- Problem: Determine if a binary tree is symmetric in structure (ignoring node values).
-
Subset Sum Equal To K
- Problem: Given a set of integers and a target sum K, determine if any subset of the integers sums to K.
- Link: Code360 – Subset Sum Equal To K
4. SQL Question
Problem Statement:
Given an Employee table with the following schema:
| Employee | Manager |
|---|---|
| E1 | E2 |
| E2 | E3 |
| E3 | E4 |
| E5 | E6 |
Write a SQL query that, for a given employee name, returns all managers in the reporting hierarchy.
- Example 1: Input:
E1→ Output:E2, E3, E4 - Example 2: Input:
E5→ Output:E6
Hint: You may need to use a recursive common table expression (CTE) to traverse the hierarchy.
WITH RECURSIVE ManagerHierarchy AS (
SELECT Employee, Manager
FROM EmployeeTable
WHERE Employee = 'E1' -- Replace 'E1' with the desired employee
UNION ALL
SELECT e.Employee, e.Manager
FROM EmployeeTable e
INNER JOIN ManagerHierarchy mh
ON e.Employee = mh.Manager
)
SELECT Manager
FROM ManagerHierarchy;These were the questions I encountered during my Oracle interview. Hope this helps others preparing for similar interviews!
Comments (4)


