Code Room
CodingEasycod-g1028
Subject Networking query stringLevel Entry–Mid~15 minCommon in Databases & SQL · Networking & APIs · Algorithms & data structures interviewsIndustries Software development

Question

Build a URL query string from an ordered list of [key, value] pairs. Percent-encode both keys and values so the result is safe for a URL (space becomes %20, reserved characters like & = are escaped), join pairs with '&' and key/value with '='. Preserve the input order. Return an empty string for an empty list.

Implement
build_query(params: list[list[str]]) → str
Examples
in[[["q","hello world"],["lang","en"]]]out"q=hello%20world&lang=en"
What a strong answer looks like

State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.