Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?这道题用来判断链表中是否有循环,最开始我想的是遍历链表,同时用一个list保存遍历过...
分类:
其他好文 时间:
2014-11-21 01:18:32
阅读次数:
203
剑指offer中题目:http://ac.jobdu.com/problem.php?pid=1521
题目描述:
输入一个二叉树,输出其镜像。
输入:
输入可能包含多个测试样例,输入以EOF结束。
对于每个测试案例,输入的第一行为一个整数n(0
Ci=’d’表示第i个节点有两子孩子,紧接着是左孩子编号和右孩子编号。
Ci=’l’表示第i个节点...
分类:
其他好文 时间:
2014-11-20 23:49:40
阅读次数:
279
由于使用SVN的时间不长,出现问题各种奇怪的问题也是在所难免的,在这里记录下来,方便自己或跟我一样的菜鸟参考
问题一:
dzt@dzt-All-Series:~/D/dzt/workarea/7301_mp/android_mtk_kk2_6752_mp/gionee/alps/frameworks/base/core/java/android/widget$ svn ci AbsListVi...
分类:
其他好文 时间:
2014-11-20 22:04:09
阅读次数:
304
Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?这道题要用双指针,但我想试一下投机取巧的办法行不行...
分类:
其他好文 时间:
2014-11-20 21:46:01
阅读次数:
185
This is what I came up with. It‘s an extension to String. Don‘t forget to add?#import <CommonCrypto/CommonCrypto.h>?to the ObjC-Swift bridging header that Xcode creates. extension?String??{
?...
分类:
移动开发 时间:
2014-11-20 18:55:46
阅读次数:
195
在使用所需的证书配置了计算机并安装了联合身份验证服务代理角色服务后,你就可以将计算机配置为联合服务器代理。可以使用以下过程,以便计算机以联合服务器代理角色进行操作。重要在使用此过程来配置联合服务器代理计算机之前,请确保你已按照联合服务器代理列出的顺序遵循了Checklist: Setting Up ...
分类:
其他好文 时间:
2014-11-20 18:18:20
阅读次数:
214
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5, and A is now [1,1,2,...
分类:
其他好文 时间:
2014-11-20 17:07:45
阅读次数:
194
为了速度和正确性,请对齐你的数据. 概述:对于所有直接操作内存的程序员来说,数据对齐都是很重要的问题.数据对齐对你的程序的表现甚至能否正常运行都会产生影响.就像本文章阐述的一样,理解了对齐的本质还能够解释一些处理器的"奇怪的"行为.内存存取粒度程序员通常倾向于认为内存就像一个字节数组.在C及其衍生语...
分类:
其他好文 时间:
2014-11-20 15:04:45
阅读次数:
418
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Ja...
分类:
其他好文 时间:
2014-11-20 13:30:27
阅读次数:
120
You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place? ...
分类:
其他好文 时间:
2014-11-20 13:20:00
阅读次数:
289