Netflix L4 Phone Screen
Company: Netflix
Role: L4
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
First an easy followed by medium, not complicated as it sounds.
Question :
Note: No json parsing required.
Examples:
dict = '{"fname": "masked_first_name", "lname": "masked_last_name", "contacts": {"cell": "+1(999).999.9999", "home": "+1(333).333.3333" }}'key = ".contacts.cell"res = “+1(999).999.9999”
dict = '{"fname": "masked_first_name", "lname": "masked_last_name", "contacts": {"cell": "+1(999).999.9999", "home": "+1(333).333.3333" }}'key = ".fname"res = “masked_first_name”
dict = '{"fname": "masked_first_name", "lname": "masked_last_name", "contacts”:{"home”:”12345”}}’key = ".contacts.cell"res = null
dict '{"fname": "jomasked_first_namehn", "lname": "masked_last_name", "contacts": {"cell": "+1(999).999.9999", "home": "+1(333).333.3333" }}'key = ".*.cell"res = ["+1(999).999.9999"]
dict = '{"fname": "jomasked_first_namehn", "lname": {"cell": "+1(888).999.9999", "home": "+1(555).333.3333" }, "contacts": {"cell": "+1(999).999.9999", "home": "+1(333).333.3333" }}'key = ".*.cell"res = ["+1(888).999.9999", "+1(999).999.9999"]
key = contact.*res = {'cell': '+1(999).999.9999', 'home': '+1(333).333.3333', 'cells': {'cell1': '121211'}}