摘要:
Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true Note: It is intended for the 阅读全文
摘要:
Design a data structure that supports all following operations in average O(1) time. Note: Duplicate elements are allowed. Example: 算法:试了一下用双Map无法实现频率 阅读全文
摘要:
Design a data structure that supports all following operations in average O(1) time. Example: 性能这么好肯定是得空间换时间。加删都是O(1),想到要用到Hash,但是HashSet不能random存取,所以 阅读全文
摘要:
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You shou 阅读全文
摘要:
Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into k non-empty subsets whose sums are all 阅读全文