Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Cracking Interview书上原题,快慢指针,如果有环肯定相遇。/** *...
分类:
其他好文 时间:
2015-04-18 08:39:30
阅读次数:
127
Good morning !It is really my honor to have this opportunity for an interview,I hope i can make a good performance today. I'm confident that I can suc...
分类:
其他好文 时间:
2015-04-16 17:04:59
阅读次数:
153
先用ST预处理一下,做到可以O(1)得到[l,r]最值 然后枚举块的长度,在枚举每个块,这样的复杂度就是n/1+n/2+n/3+...+n/n n有20W,这个前面这个式子的值差不多又240W,复杂度可以接受。。 另外一开始想到一个做法,二分答案,但是经证实这样的的确确是错的 1 #i...
分类:
其他好文 时间:
2015-04-15 00:52:08
阅读次数:
138
I think they are advanced topics.C# 1. when will you use list, when will you use hashtable. 2. when will you use Idispose. 3.Async and Awaitpublic ...
Q. What's the process and threads and what's the difference between them?A. A process is an executing program. One or more threads run in the context ...
分类:
编程语言 时间:
2015-04-14 00:12:22
阅读次数:
200
Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.cracking interview原题,2*5可以构成一...
分类:
其他好文 时间:
2015-04-13 09:25:10
阅读次数:
111
Q: What is a class?A: A class is an expanded concept of a data structure: instead of holding only data, it can hold both data and functions.Q: What ar...
分类:
编程语言 时间:
2015-04-12 20:59:27
阅读次数:
238
QuestionKey wordsAnwserAassignment operator abstract class It is a class that has one or more pure virtual functions. assignment & initialization ...
分类:
编程语言 时间:
2015-04-12 20:58:31
阅读次数:
162
Q: What is virtual function?A: Avirtual function or virtual method is a function or method whose behavior can be overridden within an inheriting class...
分类:
编程语言 时间:
2015-04-12 20:52:09
阅读次数:
169
Constructors/Destructors.我们都知道,在C++中建立一个类,这个类中肯定会包括构造函数、析构函数、复制构造函数和重载赋值操作;即使在你没有明确定义的情况下,编译器也会给你生成这样的四个函数。例如以下类: class CTest{public: CTest(); ...
分类:
编程语言 时间:
2015-04-12 19:03:29
阅读次数:
159