Example 1 · empty
- Arguments
- keys
[]
- Expected return
""
Test data
- Input
[]
- Expected output
""
func Solve(keys []string) stringThe runner calls your functions directly; you do not need to parse JSON.
[]
""
[]
""
[ "Ping" ]
"ping"
["Ping"]
"ping"
[ "API", "api", "DB" ]
"db"
["API", "api", "DB"]
"db"
[ "x", "Y", "X", "y" ]
""
["x", "Y", "X", "y"]
""
After counting, the map contains every occurrence, including repeats far apart. The second scan considers keys in encounter order and tests their complete frequency, so its first qualifying position is exactly the required first unique key. Map iteration order is irrelevant.
Expected O(C) time for C total input characters, including both normalization passes and hashing. Retained normalized keys and counts use O(D + K) auxiliary space for D distinct normalized keys containing K characters in total.
Checking execution availability…
View inputs and expected outputs. Examples do not run your code.