摘要:
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two... 阅读全文
摘要:
Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For exampl... 阅读全文
摘要:
Design a data structure that supports the following two operations:void addWord(word)bool search(word)search(word) can search a literal word or a regu... 阅读全文
摘要:
Implement a trie withinsert,search, andstartsWithmethods.Note:You may assume that all inputs are consist of lowercase lettersa-z.思路:应该就是字典树。 1 class T... 阅读全文