题目:两个链表存储数字,然后求和,和值存储在一个链表中。代码: 1 public ListNode
addTwoNumbers(ListNode l1, ListNode l2) { 2 ListNode head = new ListNode(0); 3
ListN...
分类:
其他好文 时间:
2014-06-29 15:15:57
阅读次数:
240
Implement next permutation, which rearranges
numbers into the lexicographically next greater permutation of numbers.If such
arrangement is not possibl...
分类:
其他好文 时间:
2014-06-04 21:35:20
阅读次数:
230
487-3279Time Limit:2000MSMemory Limit:65536KTotal
Submissions:236746Accepted:41288DescriptionBusinesses like to have memorable
telephone numbers. One ...
分类:
其他好文 时间:
2014-06-04 21:08:17
阅读次数:
349
Given amxngrid filled with non-negative
numbers, find a path from top left to bottom right whichminimizesthe sum of all
numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-06-04 20:57:08
阅读次数:
360
Given a sorted linked list, delete all nodes
that have duplicate numbers, leaving onlydistinctnumbers from the original
list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-06-04 20:19:49
阅读次数:
282
原题地址:https://oj.leetcode.com/problems/palindrome-partitioning/题意:Given
a strings, partitionssuch that every substring of the partition is a
palindrome...
分类:
编程语言 时间:
2014-05-29 18:26:15
阅读次数:
334
BComp.exe /silent /closescript /solo
@E:\compareTest\BCbatch.txttext-report layout:side-by-side
options:display-all,line-numbers title:"report" output...
分类:
Web程序 时间:
2014-05-29 12:22:11
阅读次数:
587
1.产生20个不同的两位整数的随机数,并且对它们进行由小到大的排序。特别提醒:程序要自动生成20个不同的整数,而且这些整数必须是两位的,如:3不是两位整数,58是两位整数View
Code List numbers= new List(); Random...
分类:
其他好文 时间:
2014-05-29 12:11:54
阅读次数:
258
Ugly NumbersTime Limit:1000MSMemory
Limit:10000KTotal Submissions:19952Accepted:8856DescriptionUgly numbers are ...
分类:
其他好文 时间:
2014-05-28 17:12:39
阅读次数:
220
题目:计算一棵二叉树所有路径组成的数的总和。思考:也是DFS的基础应用。虽然还是套着别人的DFS框架写的,但是学习通常会经历先模拟,再创新的过程。代码:
1 private int sum = 0; 2 public int sumNumbers(TreeNode root) { 3...
分类:
其他好文 时间:
2014-05-28 11:13:01
阅读次数:
225