InterviewLegend

Strings & Parsing

Alex Chen24 min readUpdated 970 real interview reports

Picture two fingers on a string, one at each edge of a stretch you care about: the right finger walks forward and pulls characters in, the left finger follows and lets them back out. That moving window is the workhorse of the string cluster. A Premium question is the most requested string problem in the loop. Its pattern is a window that grows and shrinks over a running character count. That pattern carries most of the rest: the longest run with at most k distinct letters, the smallest window that covers a target, the anagram scan. Strings are close to a fifth of the Oracle coding surface, second only to plain arrays, and the sliding window is the shape that turns up most.

None of these are trick problems. They reward a clean window with a named invariant, written on an editor that has to compile and pass the test cases. The rest of the cluster is parsing, and it is honest work: decode a bracket-encoded string, turn an integer into its English words, collapse a messy path. Those are small state machines, not puzzles, and on some Oracle rounds the built-in that would shortcut them is banned, so you walk the characters yourself. Get a plain version compiling, say out loud what keeps the window legal, and the follow-up is a short turn of the same handle rather than a new problem.

The Oracle angle
Oracle grades whether you can hold the window, not whether you know the trick. The sliding window is the string cluster's center of mass, and a Premium question Without Repeating is the runaway single tell. On the campus assessment it often lands right before a REST task. You get a URL, call it, and parse the JSON that comes back, so string handling gets graded next to the algorithm. Live rounds run on an online compiler that has to build and clear the tests. A round will sometimes ban the library helper on purpose (no regex split, no ready-made counter), because the character-by-character scan is the question.
What's inside
  • 2 problems, worked step by step
  • about 24 min

Premium lessonOracle interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · Cancel anytime

Had your Oracle interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Oracle interview guide

Know what Oracle asks before you walk in.

19 coding · 4 system design · 18 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.