Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?一次...
分类:
其他好文 时间:
2014-06-28 13:38:14
阅读次数:
171
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-06-28 13:23:40
阅读次数:
150
方法-:1,在Service中使用pagedlist实现翻页的方法写法一: /// ///政策法规的more列表翻页 /// /// 分页的页码 /// 部门代码 /// public PagedList Li...
分类:
Web程序 时间:
2014-06-28 13:06:47
阅读次数:
345
题目:Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 ...
分类:
其他好文 时间:
2014-06-24 09:09:02
阅读次数:
147
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *...
分类:
其他好文 时间:
2014-06-22 23:59:58
阅读次数:
244
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Given 1->1-...
分类:
其他好文 时间:
2014-06-22 22:57:49
阅读次数:
347
Arrayss work well for unordered sequences, and even for...
分类:
其他好文 时间:
2014-06-22 21:45:52
阅读次数:
184
Determine whether an integer is a palindrome. Do this without extra space.
思路:若使用【Leetcode】Reverse
Integer 的方法,判断反转后的整数是否与原整数相同,则可能出现溢出情况;又因为题目要求不适用额外空间,可以之间对比整数第一个与最后一个数的值,再依次类推。
class Solution {...
分类:
其他好文 时间:
2014-06-22 20:43:56
阅读次数:
187
1. 右键解决方案 -> 添加 -> 现有项目 -> 选择如下文件
\cocos2d\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj
\cocos2d\extensions\proj.win32\libExtensions.vcxproj
\cocos2d\cocos\ui\proj.win32\li...
分类:
其他好文 时间:
2014-06-22 19:55:30
阅读次数:
262
ScrollView嵌套ListView问题 导致Listview 首先导致的 是 Listview 的item 条数显示不完全, 这是因为item 中的 Textview 字数太多的问题
一定要注意 item 是 线性布局 ,二 item 中的 Textview 自动换行也会导致 item 条数显示不正确, 所以 有了如下的解决办法
1,保证 item 是 线性布局,
2. 重写Li...
分类:
其他好文 时间:
2014-06-21 18:55:36
阅读次数:
224