---
date: '2026-07-02'
id: intel
modified: 2026-07-02 14:38:42 GMT-04:00
tags:
  - seed
title: intel
created: '2026-07-02'
published: '2026-07-02'
pageLayout: default
slug: hinterland/prep/00-recon/intel
permalink: https://aarnphm.xyz/hinterland/prep/00-recon/intel.md
generator:
  quartz: v4.6.0
  hostedProvider: Cloudflare
  baseUrl: aarnphm.xyz
full: https://aarnphm.xyz/llms-full.txt
---
# recon: 60-min encoding/decoding code screen

archetype: bit/byte ops, unsigned data + alignment, varint, integers-as-byte-streams, streaming decode. web recon run 2026-07-02. confidence marked per row; leetcode discuss bodies 403 direct fetch, so some rows rest on search-snippet corroboration + aggregators.

## 1. company table

| company                                        | question shape                                                                                                                                                                                                | follow-up ladder                                                                                                                                                                                                          | confidence                                                                                  | source                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Datadog                                        | phone screen: 1 hr, 2 questions in CoderPad. practical hybrid, “buffer parsing / message parsing” style; famous community-lore variant: encode a list of unsigned ints into a byte array, decode back         | (1) ints < 256 naive one-byte → (2) arbitrary-size ints (length-prefix or 7-bit varint) → (3) negatives (zigzag) → (4) decode a stream arriving in chunks. corroborated by Datadog shipping zigzag-varint in prod tracers | medium (format verified; exact encode/decode prompt is lore, primary threads paywalled/403) | [interviewing.io/datadog](https://interviewing.io/datadog-interview-questions), [Blind Datadog interview posts](https://www.teamblind.com/company/Datadog/posts/datadog-interview), [dd-trace-dotnet VarEncodingHelper.cs](https://github.com/DataDog/dd-trace-dotnet/blob/635c879092089703ad6724bb70c96884f65cd631/tracer/src/Datadog.Trace/DataStreamsMonitoring/VarEncodingHelper.cs), [lc full-loop thread](https://leetcode.com/discuss/post/6376092/datadog-interview-full-loop-seniormid-le-x8uq/) |
| Datadog                                        | buffered file writer: given `FileWriter` interface + `buffer_capacity` in bytes, append to memory buffer, flush at capacity                                                                                   | write only N bytes `write(char[] buf, int numBytes)` → flush on size _or_ time → thread safety, partial writes, I/O errors, graceful shutdown                                                                             | high                                                                                        | [Glassdoor QTN\_8013868](https://www.glassdoor.com/Interview/Code-a-Buffered-File-Writer-QTN_8013868.htm), [designgurus](https://www.designgurus.io/answers/detail/what-are-datadog-coding-interview-questions), [prachub](https://prachub.com/interview-questions/implement-buffered-file-writer-with-concurrency-support)                                                                                                                                                                               |
| Datadog                                        | tech screen alt: latency-bucketing (list of positive ints + bucket width → frequency per range); moving average over metric stream (circular buffer)                                                          | streaming input, memory bounds                                                                                                                                                                                            | high                                                                                        | [lc tech-screening thread](https://leetcode.com/discuss/post/6375931/datadog-tech-screening-by-anonymous_user-x9aj/), [ophyai guide](https://ophyai.com/blog/company-guides/datadog-interview-guide)                                                                                                                                                                                                                                                                                                      |
| Google                                         | LC 393 UTF-8 validation: array of ints, low 8 bits = one byte; validate multi-byte sequences via leading-bit patterns                                                                                         | count expected continuation bytes; reject `10xxxxxx` starts; often given ambiguous at FAANG, you must extract the byte rules yourself                                                                                     | high                                                                                        | [LC 393](https://leetcode.com/problems/utf-8-validation/), [Taro](https://www.jointaro.com/interviews/questions/utf-8-validation/), [hellointerview](https://www.hellointerview.com/community/questions/utf8-validation/cm5eh7nri04xx838ow2awa27x)                                                                                                                                                                                                                                                        |
| Google / OpenAI / Meta                         | LC 271 encode/decode list of strings into one string (length-prefix framing, no reserved delimiter)                                                                                                           | multi-byte UTF-8 safety, overflow of length prefix, fixed-width vs `len#` header                                                                                                                                          | high                                                                                        | [LC 271](https://leetcode.com/problems/encode-and-decode-strings/), [Glassdoor Google QTN\_2605165](https://www.glassdoor.com/Interview/Encode-and-Decode-an-Array-of-strings-QTN_2605165.htm), [Taro OpenAI](https://www.jointaro.com/interviews/openai/encode-and-decode-strings/)                                                                                                                                                                                                                      |
| OpenAI                                         | build-small-systems screen (75 min): key-value store **with serialization**, lexer/parser implementations; encode/decode strings reported                                                                     | persistence to bytes, resumable/streaming iteration                                                                                                                                                                       | medium-high                                                                                 | [igotanoffer OpenAI coding](https://igotanoffer.com/en/advice/openai-coding-interview), [Taro OpenAI](https://www.jointaro.com/interviews/openai/encode-and-decode-strings/)                                                                                                                                                                                                                                                                                                                              |
| Microsoft                                      | run-length encoding, input array → **output array of bytes**                                                                                                                                                  | count > 255 in one byte (the varint trap in disguise), decode direction                                                                                                                                                   | high                                                                                        | [Glassdoor QTN\_2275897](https://www.glassdoor.com/Interview/Run-length-encoding-write-compression-function-given-input-array-and-output-array-of-bytes-QTN_2275897.htm)                                                                                                                                                                                                                                                                                                                                  |
| Goldman Sachs / Oracle / Stack Overflow / LINE | RLE string form: `"aabbb" → "a2b3"`, decode back                                                                                                                                                              | empty string, single chars, multi-digit counts, digits in input                                                                                                                                                           | high                                                                                        | [Glassdoor GS QTN\_2454026](https://www.glassdoor.com/Interview/Implement-a-run-length-encoding-function-For-a-string-input-the-function-returns-output-encoded-as-follows-a-QTN_2454026.htm), [lc Oracle thread](https://leetcode.com/discuss/interview-question/algorithms/124996/oracle-phone-screen-run-length-encoding)                                                                                                                                                                              |
| Stripe                                         | practical parsing screen (1 hr, in-house questions, never LeetCode): JSON parser subset, idempotency-key format parsing + collision detection, webhook signature validation                                   | multi-part (4 stages), each stage adds constraints; production edge cases graded                                                                                                                                          | high                                                                                        | [interviewing.io/stripe](https://interviewing.io/stripe-interview-questions), [phone-screen solutions gist](https://gist.github.com/pkafel/86470ca581350014bb89033fbffb9bb1)                                                                                                                                                                                                                                                                                                                              |
| Confluent                                      | phone screen: KV store with per-key expiration, `get_average()` over non-expired values, **data streamed in increasing-timestamp order**                                                                      | variadic-arg signature matching; streaming invariants                                                                                                                                                                     | high                                                                                        | [lc Confluent phone thread](https://leetcode.com/discuss/interview-question/759611/confluent-senior-software-engineer-phone-interview/)                                                                                                                                                                                                                                                                                                                                                                   |
| Cloudflare                                     | 45-60 min phone screen; bit-manipulation coding question reported; OA topic list includes bit ops                                                                                                             | systems flavor: parse/serialize network-ish data                                                                                                                                                                          | medium                                                                                      | [Glassdoor report](https://www.glassdoor.sg/Interview/Phone-screen-interview-involved-bit-manipulation-coding-question-followed-by-discussion-about-the-company-and-the-work-At-QTN_1689832.htm), [algocademy prep guide](https://algocademy.com/blog/cloudflare-technical-interview-prep-a-comprehensive-guide/)                                                                                                                                                                                         |
| Qualcomm / embedded (Nvidia, Broadcom class)   | swap big-endian ↔ little-endian; detect host endianness; extract/set bit fields in registers                                                                                                                  | do it via pointer/`char*` walk, via shifts+masks, via `__builtin_bswap32`; bit-field portability traps                                                                                                                    | high                                                                                        | [Glassdoor Qualcomm QTN\_112221](https://www.glassdoor.com/Interview/how-to-swap-big-endian-and-little-endian-QTN_112221.htm), [embedded prep](https://tonyfu97.github.io/Embedded-C-Interview-Prep/08_bit_manipulation/)                                                                                                                                                                                                                                                                                 |
| Arista                                         | 1-hr C phone screen (ssh into their box): malloc-like allocators, pointers, bitwise puzzles, struct padding/alignment                                                                                         | implement malloc over a PCI-mapped region; alignment reasoning graded                                                                                                                                                     | high                                                                                        | [GfG Arista set 1](https://www.geeksforgeeks.org/arista-network-interview-set-1/), [Glassdoor QTN\_1145187](https://www.glassdoor.com/Interview/The-interviewer-started-with-some-small-talk-Talked-a-little-bit-about-my-research-work-Then-went-on-with-technical-quest-QTN_1145187.htm)                                                                                                                                                                                                                |
| Neuralink                                      | embedded/SWE loop leans firmware + first-principles; public N1 compression challenge (lossless compression of 10-bit electrode samples) signals the in-house flavor: bit-packing, delta + varint-style coding | compression ratio vs latency vs power                                                                                                                                                                                     | low-medium (loop reports thin; challenge is public fact)                                    | [Glassdoor Neuralink](https://www.glassdoor.com/Interview/Neuralink-Interview-Questions-E1616853.htm), [interviewquery guide](https://www.interviewquery.com/interview-guides/neuralink-software-engineer)                                                                                                                                                                                                                                                                                                |
| MongoDB                                        | BSON = length-prefixed binary documents (int32 size, typed elements, null terminator); no verified public report of “implement BSON” as screen, treat as domain-inferred prep                                 | serialize JSON subset → bytes → parse back                                                                                                                                                                                | low (domain-inferred)                                                                       | [BSON spec docs](https://www.mongodb.com/docs/manual/reference/bson-types/), [Glassdoor MongoDB](https://www.glassdoor.com/Interview/MongoDB-Interview-Questions-E433703.htm)                                                                                                                                                                                                                                                                                                                             |

canonical background every ladder converges on: [protobuf varint encoding](https://protobuf.dev/programming-guides/encoding/) (7-bit groups, MSB continuation, little-endian group order, zigzag `(n << 1) ^ (n >> 63)` for signed) and [Let’s Make a Varint](https://carlmastrangelo.com/blog/lets-make-a-varint) for design-space tradeoffs (LEB128 vs prefix-varint).

## 2. composite most-likely 60-minute flow

Datadog-shaped: one problem, ladder revealed one rung at a time; interviewer holds later rungs hostage to your pace.

- **0:00–0:05 intro.** one sentence on your background. do not burn time.
- **0:05–0:12 clarify + contract.** ask the questions in section 4. state the API you will build: `encode(list[int]) -> bytes`, `decode(bytes) -> list[int]`. say the roundtrip property aloud: `decode(encode(xs)) == xs` for all valid `xs`. write that test skeleton first.
- **0:12–0:30 core implement.** rung 1 is deliberately trivial (all ints in `[0, 255]` → one byte each). ship it fast, correct, tested. name the limitation yourself before the interviewer does (“this breaks at 256; I’d either length-prefix each value or use a continuation-bit scheme”). volunteering the next rung is the single highest-signal move in this screen.
- **0:30–0:42 extension A: arbitrary-size ints.** implement LEB128-style varint: emit low 7 bits, set bit 7 if more remain; decode accumulates `(b & 0x7f) << shift`. mention the alternative (length byte + big-endian payload) and why you chose one (varint: small ints cost 1 byte, no 255-byte cap; metric/telemetry data is mostly small, so wire size drops roughly 2–4x vs fixed 4-byte ints, which is why protobuf/Kafka/Datadog tracers use exactly this).
- **0:42–0:52 extension B: signed and/or streaming.** signed → zigzag mapping (0→0, −1→1, 1→2, −2→3) so magnitude stays small; or two’s-complement fixed width if interviewer prefers. streaming → a `Decoder` class with `feed(chunk) -> list[int]`: keep `(accum, shift)` as state across chunks, emit completed values, hold partials. this rung is where the Datadog buffered-writer DNA shows: state machines over byte boundaries, flush semantics.
- **0:52–0:58 edge-case hardening.** run your roundtrip test on: `[]`, `[0]`, `[127, 128]`, `[255, 256]`, max u64, truncated final varint (streaming: hold, one-shot: raise), continuation run past 10 bytes (malformed, raise), non-canonical over-long encoding like `0x80 0x00` (state your policy).
- **0:58–1:00 complexity wrap.** encode/decode O(total bytes) time, O(1) auxiliary state beyond output; bytes-per-value 1 for < 128 up to 10 for max u64 vs flat 4/8 fixed-width; streaming decoder holds at most 10 bytes of partial state regardless of chunk sizing.

if the screen is 2-question format (Datadog phone screens frequently are), expect rung 1–2 as Q1 and the streaming/stateful variant (or buffered writer) as Q2, \~25 min each.

## 3. what interviewers actually grade

- **roundtrip-test-first habit.** writing `assert decode(encode(xs)) == xs` before generalizing. Stripe and Datadog both grade production reflexes over algorithmic flash ([interviewing.io/stripe](https://interviewing.io/stripe-interview-questions), [ophyai datadog](https://ophyai.com/blog/company-guides/datadog-interview-guide): “clean, efficient code is expected” with error handling and edge cases).
- **byte-level fluency without stalling.** `& 0x7f`, `| 0x80`, shift-then-mask order, unsigned right shift where the language needs it (Java `>>>`, Python ints are arbitrary so mask explicitly, JS needs `>>> 0` or BigInt past $2^{31}$). hesitation here reads as “never touched a wire format”.
- **edge-case enumeration unprompted.** 0, boundary values 127/128 and 255/256, empty input, max width, truncation, garbage bytes. interviewers keep a checklist; each one they must hand you costs signal.
- **API/state design for streaming.** decoder as object with explicit partial state vs generator; who owns the buffer; what `feed` returns on incomplete input. Datadog’s buffered-writer follow-ups (flush on size or time, partial writes, shutdown) grade exactly this ([prachub](https://prachub.com/interview-questions/implement-buffered-file-writer-with-concurrency-support)).
- **communication of the encoding decision.** naming the schemes (fixed-width, length-prefix, continuation-bit varint, zigzag) and picking with a stated reason. knowing the protobuf formula `(field << 3) | wire_type` territory is a plus signal, silence is neutral, inventing a delimiter-based byte format that cannot contain the delimiter is negative.
- **malformed-input policy stated, then enforced.** deciding raise-vs-skip up front and writing the guard (max 10 continuation bytes for u64) instead of improvising when the interviewer feeds garbage.

## 4. clarifying questions for the first five minutes

1. signed or unsigned? if signed, may I use zigzag, or do you want fixed-width two’s complement?
2. max magnitude — fits in u32, u64, or arbitrary-precision?
3. output type: raw bytes/bytearray, or a string (and if string, full 0–255 alphabet or printable-only)?
4. endianness: any required byte order for multi-byte values, or is the scheme mine to define? (varint fixes little-endian group order by construction; fixed-width needs an explicit choice.)
5. malformed input on decode: raise, return partial + error, or skip? is input trusted?
6. is canonical form required — must I reject over-long encodings (`0x80 0x00` for 0)?
7. one-shot buffer, or bytes arriving in chunks (do you want a stateful/streaming decoder API)? can a value straddle a chunk boundary?
8. allocation constraints: free to append to a growable buffer, or fixed pre-allocated output (embedded flavor)? any memory ceiling relative to input size?
9. data distribution: mostly small integers? (decides varint vs fixed-width; say why it matters — wire size.)
10. am I allowed stdlib codecs (`struct.pack`, `DataView`, `varint` libs) or is hand-rolling the point? (it is the point; ask anyway, it shows you know libraries exist.)

## 5. red flags that fail candidates

- **stringification dodge.** `",".join(map(str, xs))` when byte output was specified. interviewer redirects once; a second dodge ends the calibration.
- **7-bit/8-bit confusion.** off-by-one at 127/128 (varint payload is 7 bits) or 255/256 (byte is 8). the ladder is built to expose exactly this boundary.
- **sign/shift bugs.** arithmetic shift where logical was needed, missing `& 0xff` when a language yields signed bytes (Java), shifting past width, JS numbers silently losing bits past $2^{53}$.
- **unbounded decode loop.** no guard on continuation bytes → malformed input `0x80 0x80 0x80...` spins forever or overflows shift. the 10-byte u64 cap is the tell of someone who has read a real varint decoder.
- **streaming state dropped at chunk boundary.** emitting a garbage value from a truncated varint instead of holding `(accum, shift)` for the next `feed`.
- **testing encode only.** never running decode, or never running decode-of-encode. no roundtrip = no correctness argument.
- **delimiter schemes that cannot escape the delimiter.** picking `0xFF` as separator with no escaping when values can contain `0xFF`.
- **silent policy improvisation.** handling the first malformed case by returning `None`, the second by raising, the third by skipping.
- **embedded flavor: alignment/endianness sins.** casting `char*` to `uint32_t*` at unaligned offsets, assuming host endianness on wire data ([Qualcomm endianness question](https://www.glassdoor.com/Interview/how-to-swap-big-endian-and-little-endian-QTN_112221.htm), [Arista padding questions](https://www.geeksforgeeks.org/arista-network-interview-set-1/)).
- **no complexity story.** cannot state bytes-per-value or why varint beats fixed-width on the given distribution; “it’s O(n)” with no n defined.

