摘要:
Majority Number Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it. Example Gi 阅读全文
摘要:
Given an integer array, adjust each integers so that the difference of every adjacent integers are not greater than a given number target. If the arra 阅读全文
摘要:
关注Trie 这种结构已经很久,Trie有一个很有趣的用途,那就是自动提示。而且,前不久在一次面试里,也需要用Trie来解答。所以,在此对这个数据结构进行总结。Trie,又称单词查找树或键树,是一种树形结构。典型应用是用于统计和排序大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频 阅读全文
摘要:
Word Search I Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell 阅读全文