2015年2月12日

LeetCode-53 Maximum Subarray

摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1,2,1... 阅读全文

posted @ 2015-02-12 19:13 linxiong1991 阅读(109) 评论(0) 推荐(0) 编辑

LeetCode-52 N-Queens II

摘要: Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.首先需要确定什么位置放置皇后是合法的(满足同一行,同一... 阅读全文

posted @ 2015-02-12 12:44 linxiong1991 阅读(98) 评论(0) 推荐(0) 编辑

导航