ZipRecruiter OA 4 Questions Pass | Full Review Programming Logic Questions + High Score Passing Tips

638 Views
No Comment

Recently finished ZipRecruiter 's 2026 NG OA is one of those "graded unlock" questions - you can't see question 2 until you've done question 1. This time, I did all four questions in AC, and the overall difficulty is medium to easy, but the logic is abstract and the implementation should be rigorous. The following is a detailed review + a modified version of the new question data, for those who want to prepare for OA, you can refer to it directly.

ZipRecruiter OA

ZipRecruiter OA Overview

Content Clarification
Total number of topics 4 issues (graded unlocking)
Topic Direction Emulate in-memory databases and add functionality incrementally
difficulty level Level 1 simple → Level 4 slightly complex
Core Examination Points Data structure design, TTL time management, backup recovery logic
Use of language Python (dict implementation is sufficient)

Level 1 - Basic CRUD Operations

Problem Description

Implement a basic in-memory database that supports the following operations.

set(key: str, field: str, value: str) -> None
get(key: str, field: str) -> str | None
delete(key: str, field: str) -> bool

Requirements.

  • Each record is identified by a unique key.
  • Each record contains multiple field-value pairs.
  • set() inserts or updates the field.
  • get() retrieves the value if it exists.
  • delete() removes the field if it exists and returns a boolean.

Example (with updated data)

Operation Return Database State
set("user_77", "name", "Alice") - {"user_77": {"name": "Alice"}}
set("user_77", "email", "a@x.com") - {"user_77": {"name": "Alice", "email": "a@x.com"}}
get("user_77", "name") "Alice." -
delete("user_77", "name") True {"user_77": {"email": "a@x.com"}}
get("user_77", "name") None -

Level 2 - Scanning and Prefix Filtering

Problem Description

Extend your in-memory database to support listing fields and filtering by prefix.

scan(key: str) -> list[str]
scan_by_prefix(key: str, prefix: str) -> list[str]

Requirements.

  • scan() returns all fields for a given key in lexicographic order.
  • scan_by_prefix() returns only fields starting with the given prefix.
  • The output format should be.
    ["()", ...]

Example (with updated data)

Operation Return
set("session99", "a_token", "xxx") -
set("session99", "b_count", "5") -
set("session99", "cfg", "on") -
scan("session99") ["a_token(xxx)", "b_count(5)", "cfg(on)"]
scan_by_prefix("session99", "b") ["b_count(5)"]
scan("unknown") []

Level 3 - Timestamps and TTL Management

Problem Description

Introduce timestamps and Time-To-Live (TTL) logic for all data operations.
Each operation now includes a timestamp parameter, and records with TTLs should expire after their valid period.

New Methods.

set_at(key: str, field: str, value: str, timestamp: int) -> None
set_at_with_ttl(key: str, field: str, value: str, timestamp: int, ttl: int) -> None
get_at(key: str, field: str, timestamp: int) -> str | None
delete_at(key: str, field: str, timestamp: int) -> bool

Example (updated dataset)

Timestamp Operation Output Explanation
10 set_at_with_ttl("cache1", "val", "X", 10, 7) - Valid within [10, 17)
12 get_at("cache1", "val", 12) "X" Still valid
18 get_at("cache1", "val", 18) None Expired
20 set_at("cache1", "tag", "v2", 20) - Permanent field

Implementation Notes.

  • Each field can be represented as.
db[key][field] = {"val": value, "start": timestamp, "ttl": ttl or None}

Expired when. current_timestamp >= start + ttl

Always clean up expired entries before every operation.

Level 4 - Backup and Restore Functionality

Problem Description

Add backup and restore features to maintain database snapshots over time.

New Methods.

backup(timestamp: int) -> int
restore(timestamp: int, timestamp_to_restore: int) -> None

Example (updated data)

Timestamp Operation Output Explanation
5 set_at_with_ttl("s", "k1", "v1", 5, 10) - Active in [5, 15)
9 backup(9) 1 Saves snapshot with 6 seconds remaining TTL
20 restore(20, 9) - TTL recalculated. [20, 26)
25 get_at("s", "k1", 25) "v1" Still valid
27 get_at("s", "k1", 27) None Expired

Programhelp Assists to make your path to the big factory more stable and faster!

Whether it's Amazon, Google or OpenAI's OA, VO, we've helped thousands of students successfully get offers! Programhelp specializes in written exams and interviews for large companies to help with the whole process:

OA untraceable online assists: Full coverage of HackerRank, CodeSignal, and Codility, 100% pass and refund guarantee;

Real-time voice alerts to assist: Instant tips on ideas to help you answer high-frequency questions in VO interviews;

Mock simulations & frameworks: Rehearse real-life scenarios in advance and train the standard answer logic of the big factories;

We have witnessed countless students from ordinary backgrounds go from being stuck in OA to easily winning offers from big companies.
If you also want to take your next written test or interview stress-free, prepare more efficiently and perform better with Programhelp!

author avatar
jor jor
END
 0