Google Phone Screen L3 - USA - Rejected

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-09-04Added By Anonymous
Source: Link

Company: Google
Role: L3
Interview Stage: Phone Screen
Location: USA
Year: unknown

Original Post Content:

Prefix
*
192.168.*
192.168.2.*
192.168.2.1

IP Address
0.0.0.0
192.168.7.1
192.168.2.3
192.168.2.1

Output
0.0.0.0 → *
192.168.7.1 → 192.168.*
192.168.2.3 → 192.168.2.*
192.168.2.1 → 192.168.2.1

Question
Map the address to the correct prefix, and if no prefix exists, then match it to *.

This was my question for my phone screen round and I bombed it. I didn't know it was Trie.

Comments