- 博客(3)
- 资源 (8)
- 收藏
- 关注
原创 Reverse a LinkedList 链表倒置
两种方法倒置一个链表1. 递归亮点在于构建一个假的head:newHead,代码如下:class RecursivelyReverseLinkedList{ ListNode newHead = new ListNode(0); public ListNode reverseList(ListNode head) { if(head == null) {
2015-06-16 17:05:50 491
翻译 Java中输出数组内容
两种方法1. 遍历// 对于int型数组int arrays[] = {1,2,3,4,5,4,3,2,1};for(int temp : arrays) { System.out.println(temp);}// 或者for(int i = 0; i < arrays.length; i++) { System.out.println(temp);}2. 使用Array
2015-06-12 16:40:21 1264
翻译 Distinct Subsequences
Distinct Subsequences Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string by deleti
2015-06-01 19:55:08 360
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人