Skip to content

feat(hireup): add Service Call Profiler as OA question A - #128

Merged
codenamed22 merged 1 commit into
mainfrom
feat/hireup-third-question
Aug 1, 2026
Merged

codenamed22 merged 1 commit into
mainfrom
feat/hireup-third-question

Conversation

@codenamed22

Copy link
Copy Markdown
Owner

Summary

A real OA needs more than two problems, and the previous set opened straight onto a prefix-imbalance argument. This adds Service Call Profiler as an approachable question A.

The OA is now a clean escalation:

Problem Difficulty Technique
A Service Call Profiler Easy Stack simulation
B Driver Rebalancing Across City Corridors Medium Prefix sums
C Best Dispatch Hub Hard Tree rerooting

Problem A

Given a single-threaded profiler log of <id>:start:<t> / <id>:end:<t> entries, report each service's exclusive running time, excluding time spent paused on nested calls. End timestamps are inclusive, and a service may re-enter itself.

Test coverage

  • 2 samples, 5 hidden (instant call, three-deep nesting, non-overlapping calls, interleaved re-entry, timestamps up to 10^9)
  • 3 stress tests: 50k nested re-entries (breaks recursive walks and any per-entry stack rescan), plus flat call logs across 2 and 100 services

Output is a few hundred bytes, well inside the judge's 2 MB limit.

Validation

  • All 27 tests pass against both the Python and C++ references (10/10, 9/9, 8/8)
  • Slowest reference run 964 ms against a 2000 ms limit
  • Prettier, ESLint, tsc --noEmit, and 113 unit tests all pass

A real OA needs more than two problems, and the set jumped straight to a
prefix-imbalance argument. Service Call Profiler is a stack simulation that
gives candidates a reachable opening problem.

The OA is now A (EASY, stack) < B (MEDIUM, prefix sums) < C (HARD, tree
rerooting). Stress tests cover 50k nested re-entries, which breaks recursive
walks and any per-entry stack rescan, plus flat call logs across 2 and 100
services. Output stays a few hundred bytes, well inside the judge limit.
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
shardup-site Error Error Aug 1, 2026 2:17pm

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

Vercel didn’t deploy this pull request to the codenamed22's projects team.

GitHub couldn’t verify an account for commit ff27a3a. Vercel blocks this deployment before it can verify the account’s access to the team.

Review the commit before changing settings. If you don’t recognize it, don’t deploy it. Ask a repository administrator to investigate.

If you do recognize it, verify the commit email in GitHub, connect that GitHub account to Vercel, then create a new commit and deploy again.

Check your GitHub commit email · Troubleshoot Vercel access

Commit: ff27a3a235bb52318416768264feaee64484c4d4

@codenamed22
codenamed22 merged commit 014b4a0 into main Aug 1, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant