摘要: There is a building of n floors. If an egg drops from the k th floor or above, it will break. If it's dropped from any floor below, it will not break. 阅读全文
posted @ 2017-09-25 08:25 jasminemzy 阅读(356) 评论(0) 推荐(0) 编辑
摘要: There is a building of n floors. If an egg drops from the k th floor or above, it will break. If it's dropped from any floor below, it will not break. 阅读全文
posted @ 2017-09-25 08:12 jasminemzy 阅读(436) 评论(0) 推荐(0) 编辑
摘要: Given a target number and an integer array sorted in ascending order. Find the total number of occurrences of target in the array. Example Given [1, 3 阅读全文
posted @ 2017-09-25 04:58 jasminemzy 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Follow up for Search in Rotated Sorted Array: What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function 阅读全文
posted @ 2017-09-24 09:23 jasminemzy 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 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 0 1 2). You are given a target va 阅读全文
posted @ 2017-09-24 09:13 jasminemzy 阅读(108) 评论(0) 推荐(0) 编辑
摘要: The code base version is an integer start from 1 to n. One day, someone committed a bad version in the code case, so it caused this version and the fo 阅读全文
posted @ 2017-09-23 07:46 jasminemzy 阅读(111) 评论(0) 推荐(0) 编辑
摘要: There is an integer array which has the following features: The numbers in adjacent positions are different. A[0] < A[1] && A[A.length - 2] > A[A.leng 阅读全文
posted @ 2017-09-23 07:31 jasminemzy 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 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 0 1 2). Find the minimum element. 阅读全文
posted @ 2017-09-23 06:46 jasminemzy 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 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 0 1 2). Find the minimum element. 阅读全文
posted @ 2017-09-23 05:43 jasminemzy 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given a big sorted array with positive integers sorted by ascending order. The array is so big so that you can not get the length of the whole array d 阅读全文
posted @ 2017-09-23 05:23 jasminemzy 阅读(110) 评论(0) 推荐(0) 编辑