摘要: Design a data structure that supports all following operations in average O(1) time. Example: 阅读全文
posted @ 2017-04-10 21:19 Tsunami_lj 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Shuffle a set of numbers without duplicates. Example: 阅读全文
posted @ 2017-04-10 20:19 Tsunami_lj 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. 阅读全文
posted @ 2017-04-10 17:12 Tsunami_lj 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by upd 阅读全文
posted @ 2017-04-10 16:28 Tsunami_lj 阅读(105) 评论(0) 推荐(0) 编辑