Recca Chao 的 gitHub page

推廣網站開發,包含 Laravel 和 Kotlin 後端撰寫、自動化測試、讀書心得等。Taiwan Kotlin User Group 管理員。

View on GitHub


This problem was asked by Google.

Implement a key value store, where keys and values are integers, with the following methods:

For example, if we ran the following calls:

kv.update(1, 1)
kv.update(2, 1)

And then called kv.max_key(1), it should return 2, since it's the largest key with value 1.

Kotlin Solution


回到 daily coding problem 列表