摘要:
紧接上一讲的Break Point of H。有一个非常intuition的结论,如果break point在k取到了,那么k+1, k+2,... 都是break point。那么除此之外,我们还能获得那些讯息?这里举了一些例子,核心就是说下面的事情简言之,如果H有Break Point k,那么... 阅读全文
摘要:
题目:Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function... 阅读全文
摘要:
题目:Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.代码:/** * Definition for a point. * struct Point { ... 阅读全文
摘要:
题目:Given an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) justified.You shoul... 阅读全文
摘要:
题目:Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.代码:class Solution {public: int div... 阅读全文