Closed aletheia7 closed 7 years ago
This is what I intended. Returns the key that following conditions:
Examples:
LongestPrefix("/hi") // Output: "/hi"
LongestPrefix("/hi/hoge") // Output: "/hi"
LongestPrefix("/hi/bye/hoge") // Output: "/hi/bye"
LongestPrefix("/hi/bye/why/hoge") // Output: "/hi/bye/why"
Thanks
If I Insert() the following keys:
LongestPrefix(/hi) will output /hi. I am expecting /hi/bye/why from the description.
Why is /hi the longest prefix?