摘要:
给一个非负数组A,元素们是A[i], i=0,...,n 1. 索引i代表x坐标,值A[i]表示高度.索引i与A[i],既(i, A[i])表示了垂直于x轴的线段. 请找出两条线段,与x轴组成的桶最多能装多少水? 人家想法: 先从底最宽搜起.两个边找最矮的移动,计算容积,保留最大值,循环条件 lef 阅读全文
摘要:
Follow up for "153. Find Minimum in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run time complexity? How and why? Sup 阅读全文