ORACLE Interview Experience | SDE - I

1410
May 06, 2025

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:

  1. Encapsulation
  2. Abstraction
  3. Inheritance
  4. Polymorphism

3. Data Structures & Algorithms (DSA) Questions

  1. LeetCode 179: Largest Number

  2. Symmetric Tree Check

    • Problem: Determine if a binary tree is symmetric in structure (ignoring node values).
  3. Subset Sum Equal To K


4. SQL Question

Problem Statement:
Given an Employee table with the following schema:

EmployeeManager
E1E2
E2E3
E3E4
E5E6

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)