题目地址:https://oj.leetcode.com/problems/intersection-of-two-linked-lists/题目内容:Write a program to find the node at which the intersection of two singly l...
分类:
其他好文 时间:
2014-12-08 19:22:13
阅读次数:
184
题目地址:https://oj.leetcode.com/problems/find-peak-element/题目内容:A peak element is an element that is greater than its neighbors.Given an input array wher...
分类:
其他好文 时间:
2014-12-08 17:37:32
阅读次数:
114
IP地址判断、查找兄弟单词、整形字符串排序、在字符串中找出最长连续的数字串、Fibonacci 数列的计算和转换......
分类:
其他好文 时间:
2014-12-07 21:46:56
阅读次数:
178
这是LeetCode上的一道题目,求出对于一个string,至少切多少刀可以让所有的substring都是回文串。原题是 https://oj.leetcode.com/problems/palindrome-partitioning-ii/Given a string s, partition s...
分类:
其他好文 时间:
2014-12-07 16:24:04
阅读次数:
215
迷之好奇Time Limit: 2000ms Memory limit: 65536K有疑问?点这里^_^题目描述FF得到了一个有n个数字的集合。不要问我为什么,有钱,任性。FF很好奇的想知道,对于数字x,集合中有多少个数字可以在x前面添加任意数字得到。如,x = 123,则在x前面添加数字可以得到...
分类:
其他好文 时间:
2014-12-07 01:14:50
阅读次数:
196
Box of Bricks
时间限制:1000 ms | 内存限制:65535 KB
描述Bob在垒砖块,但是他垒的有些乱,但是他很懒,所以想花费最少的体力来让他垒好的砖块一样高,所以你需要做的就是算出最少需要移动的砖块
输入多组测试数据,以EOF结束,第一行是一个n(1
第二行是n个正整数k(1
输出对于每组输入数据有两行输出,第一行是一个Case #x...
分类:
其他好文 时间:
2014-12-07 00:10:49
阅读次数:
221
题目地址:SDUT OJ 3045
这题比赛的时候想的差不多。。但是总是觉得不对。。写了一次就没再写,然后删了。。当时没想到的是第二次求出来的就是最长链。。当时想到的两次bfs找最大值(这一种方法其实结果也对。。TAT。。),还有找到点后在回溯减去重点等等。。但总觉得好像都不太对。。。赛后才知道这题原来是树的直径。。。。。牡丹江区域现场赛的时候遇到过,不过赛后也没看。。。
找树的直径的方法其实...
分类:
其他好文 时间:
2014-12-06 22:54:08
阅读次数:
227
题目网址:https://oj.leetcode.com/problems/add-two-numbers/题目描述:You are given two linked lists representing two non-negative numbers. The digits are stored...
分类:
其他好文 时间:
2014-12-06 20:19:23
阅读次数:
196
后缀数组学习笔记——详解,debug代码、手动模拟过程,一定能看懂...
分类:
编程语言 时间:
2014-12-06 19:35:35
阅读次数:
213
题目网址:https://oj.leetcode.com/problems/single-number/题目描述:Given an array of integers, every element appears twice except for one. Find that single one....
分类:
其他好文 时间:
2014-12-05 22:34:16
阅读次数:
248