摘要: Find Minimum in Rotated Sorted Array I Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 阅读全文
posted @ 2015-06-15 22:18 linqiaozhou 阅读(300) 评论(0) 推荐(0)
摘要: Search in Rotated Sorted Array I Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 阅读全文
posted @ 2015-06-15 16:46 linqiaozhou 阅读(273) 评论(0) 推荐(0)
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 【题意】 求二维平面上n个点中,最多共线的点数。 转自:http://blog.csdn.net/d 阅读全文
posted @ 2015-06-15 14:45 linqiaozhou 阅读(291) 评论(0) 推荐(0)
摘要: 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 fo 阅读全文
posted @ 2015-06-15 11:24 linqiaozhou 阅读(259) 评论(0) 推荐(0)