摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2015-04-09 13:54 D_riv 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 描述: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a ... 阅读全文
posted @ 2015-04-08 20:42 D_riv 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 描述 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, whe... 阅读全文
posted @ 2015-04-08 20:36 D_riv 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 目前我很有自知之明的把自己归为菜鸟一类,大四都要结束了也没干过什么太大的项目,最多就是跟同学合力做的大作业,电脑播放器,安卓app之类。过完今年的六月就要开始自己的研究生生涯了,于是痛下决心开始提升水平,为了记录以及督促自己,就有了写博客的想法,之前在网易博客写过几篇文章,都是学长推荐给我的PO... 阅读全文
posted @ 2015-04-08 20:04 D_riv 阅读(107) 评论(2) 推荐(0) 编辑
摘要: 描述:Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 =0&&py>=0&&px<n&&py... 阅读全文
posted @ 2015-04-08 19:43 D_riv 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 本题借鉴了别人的做题思想,主要如下/***对要扫描到的每个岛求出雷达可以安置在海岸上的区间[left,right], *对这些区间按left从小到大排序 *从第一个区间的right点开始安置雷达,然后依次检索下一个区间, *若下一个区间完全在刚刚安置雷达的区间内(new.left>=pre.left... 阅读全文
posted @ 2015-04-08 19:34 D_riv 阅读(219) 评论(0) 推荐(0) 编辑