Encode and Decode Strings
Encode and Decode Strings Implement two functions: - encode(strs): List[str] -> str - decode(s): str -> List[str] Correctness requirement: decode(encode(strs)) must equal strs. Part 1 constraints: - Each input string contains only lowercase letters (a-z). - Strings may be empty. Example: encode(["hello", "world"]) → some encoded string decode(that string) → ["hello", "world"]
This is a string problem that rewards careful parsing and strong edge-case instincts. Interviewers love it because it reveals your rule-based parsing and your edge-case discipline. Go slow on indexing; most string bugs are just off-by-one mistakes.

Meet Coco
Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.
Each locked part opens in the editor once the part before it passes.