Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not c...
分类:
其他好文 时间:
2014-08-23 15:11:00
阅读次数:
153
Remove Duplicates from Sorted List II
Total Accepted: 17137 Total
Submissions: 69046My Submissions
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only d...
分类:
其他好文 时间:
2014-08-23 14:00:40
阅读次数:
187
同上题:但是这题需要考虑好对当前节点的left和right的next指针如何设置。 1 /** 2 * Definition for binary tree with next pointer. 3 * struct TreeLinkNode { 4 * int val; 5 * Tre...
分类:
其他好文 时间:
2014-08-22 22:23:59
阅读次数:
324
题目: UVA - 10599Robots(II)(LIS)
题目大意:一个N * M 的矩阵,上面有些格子上有垃圾,现在要求一个机器人从1,1的格子出发,往右或是往下走最终到达N * M各格子,沿途要收集最多的垃圾。现在将垃圾编号,要求输出最多能清理的垃圾并且输出这样的清理路线有多少条,输出其中字典序最小的那一条。
解题思路:一开始还以为是简单的dp,结果输出发现路径多了好多...
分类:
其他好文 时间:
2014-08-22 13:03:18
阅读次数:
211
给定一个链表头, 探测其是否有环, 如果没有返回NULL, 如果有返回环开始的位置.环开始的位置定义为被两个指针指向的位置.算法描述:1. 快慢指针遍历, 如果到头说明无环返回NULL, 如果相遇说明有环, 进入2.2. 慢指针回到起点, 快慢指针每次移动一格直到相遇, 返回快指针/慢指针.代码: ...
分类:
其他好文 时间:
2014-08-22 10:49:06
阅读次数:
178
一个Coverage数据由两个文件夹组成:一个文件夹用于存储空间几何信息,该文件夹的名称就是这个Coverage数据的名称(如下图的hnc);另一个文件夹的名字为info,它存储的为Coverage的属性信息。Coverage文件命名规则:(i)不能长于13个字符 (ii)不能包含空格 (iii.....
分类:
其他好文 时间:
2014-08-22 10:46:05
阅读次数:
152
一、自定义类型转换器 1). 为什么需要自定义的类型转换器 ? 因为Struts不能自动完成字符串到引用类型的转换。2). 如何定义类型转换器?I. 开发类型转换器的类: 扩展 StrutsTypeConverter 类; II. 配置类型转换器。 有两种配置方式 ①. 基于字段的配置: > 在字....
分类:
其他好文 时间:
2014-08-21 12:57:14
阅读次数:
291
微软近期Open的职位:Job posting title: SDEII - Senior SDEJob Location: Beijing or SuzhouBing Index Serve team is hiring! We are one of the core teams in Bing ...
分类:
其他好文 时间:
2014-08-21 02:42:43
阅读次数:
207
Given a collection of integers that might contain duplicates, S, return all possible subsets.Note:Elements in a subset must be in non-descending order...
分类:
其他好文 时间:
2014-08-20 19:37:12
阅读次数:
175
题意奇葩的一笔,本质上就是一个复杂统计,智商低下的我想不出来只好去搜了题解#include #include #include #include #include #include #include #include #include #include #include #include #incl...
分类:
其他好文 时间:
2014-08-20 19:16:53
阅读次数:
227