Code Room
CodingEasycod-g1039
Subject Networking mac addressLevel Entry–Mid~15 minCommon in Networking & APIs interviewsIndustries Software development, Telecom

Question

Normalize a MAC address to canonical lowercase colon-separated form. Accept input using colons, hyphens, or Cisco-style dotted groups as separators (e.g. '01:23:45:67:89:AB', '01-23-45-67-89-ab', '0123.4567.89ab'). A valid MAC has exactly 12 hexadecimal digits once separators are removed. Return the canonical form 'aa:bb:cc:dd:ee:ff' (lowercase), or 'invalid' if the input is not a well-formed MAC.

Implement
normalize_mac(mac: str) → str
Examples
in["01:23:45:67:89:AB"]out"01:23:45:67:89:ab"
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.