摘要:
在刷LeetCode时遇到了一题可以用到分治思想的题目,刚好前段时间有看到过关于分治思想的讲解,但是不是很理解,这里再学习一次。 分而治之(divide and conquer,D&C)——一种著名的递归式问题解决方法。 使用分治解决问题的过程包括两个步骤: 1.找出基线条件,这种条件必须尽可能简单 阅读全文
posted @ 2018-04-20 21:41
C_supreme
阅读(714)
评论(0)
推荐(0)
摘要:
Description Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. E 阅读全文
posted @ 2018-04-20 21:23
C_supreme
阅读(267)
评论(0)
推荐(0)
摘要:
Description Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were in 阅读全文
posted @ 2018-04-20 11:15
C_supreme
阅读(167)
评论(0)
推荐(0)

浙公网安备 33010602011771号