← 返回 doordash 的题目列表Design Path Key Value Store
类型:online_judge
Design a path key-value store system that allows storage and retrieval using paths (e.g., /a/b/c) as keys. Utilize a Trie data structure for managing paths. The design should support the following operations: put(path: str, value: int) to set a value for a path; get(path: str) -> int to retrieve the value for a path. If the path does not exist, return -1.
Example
Input
/a/b/c
3
Put