Implement in-memory data structures and booking API
Company: Oracle
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: hard
Interview Round: Technical Screen
This question evaluates proficiency in data structures and algorithms, systems-level data modeling, and practical API design by testing in-memory key-value stores, list and string operations, LRU eviction mechanics, linked-list and tree manipulation, and stateful booking behavior.
Company: Oracle
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: hard
Interview Round: Technical Screen
Implement an in-memory key-value store that supports string values and list-of-strings values.
SET(key, value)
key
to a
string
value
.
LIST_PUSH(key, value)
key
as a
list of strings
.
value
to the
head
of the list.
GET(key)
key
, which may be:
LIST_REMOVE(key, count, value)
value
from the list at
key
.
count > 0
: remove the
first count
matching elements scanning from head → tail.
count < 0
: remove the
last |count|
matching elements scanning from tail → head.
count = 0
: remove
all
matching elements.
Design and implement an LRU (Least Recently Used) cache with typical operations:
Get(key) -> value or not found
Put(key, value)
Constraints/requirements:
C
.
Get
/
Put
should be
O(1)
average time.
Clarify:
Given a binary tree root and an integer target, repeatedly delete all leaf nodes whose value equals target.
target
, it should be deleted as well.
null
).
Implement a stateful API/service for booking appointments.
Book(doctorId, date) -> bookedTimeSlot | error
.
doctorId
on the given
date
.
Quick Answer: This question evaluates proficiency in data structures and algorithms, systems-level data modeling, and practical API design by testing in-memory key-value stores, list and string operations, LRU eviction mechanics, linked-list and tree manipulation, and stateful booking behavior.