摘要:
This question is confusing. But if we see the wrong cases below, we can understand the meaning.If word's abbr is not in dic, then return true.Else if ... 阅读全文
摘要:
(1)This one I used DP.O(n).Runtime:3 msThis is the only one I have can be accepted on leetcode.public classNumArray { privateint[] acc;//acc[i]:recor... 阅读全文
摘要:
(1)Best way.94%This one uses Lagrange's four-square theorem.According to it, every integer is a sum of at most 4 perfect square numbers. Therefore the... 阅读全文
摘要:
Given a bounch of points, ask to find K closest point to origin.This question can be changed. For example, here is origin, but there might be another ... 阅读全文