Write code to remove duplicates from an unsorted linked list.
分类:
其他好文 时间:
2014-07-08 22:18:56
阅读次数:
219
Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0.
分类:
其他好文 时间:
2014-07-08 22:17:29
阅读次数:
193
Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do th...
分类:
其他好文 时间:
2014-07-08 22:06:25
阅读次数:
222
Implement an algorithm to delete a node in the middle of a single linked list, given only access to that node.
分类:
其他好文 时间:
2014-07-08 22:03:31
阅读次数:
195
Good morning, my name is Li Huan. It’s really a great honor to have this opportunity for a interview. I hope I can make a good performance today. Now ...
分类:
其他好文 时间:
2014-07-07 12:11:36
阅读次数:
194
这道题之前在Cracking the Coding interview上做过类似的,一样的三次反转,即可得到,时间复杂度为O(n),空间复杂度为O(1)。这道题在九度OJ上测试,主要要考虑移动的位数大于字符串长度时的情况,取余即可。...
分类:
其他好文 时间:
2014-06-05 09:34:36
阅读次数:
236
Part1http://techmytalk.com/2014/01/24/java-interview-reference-guide-part-1/Posted
onJanuary 24, 2014byNitin KumarJAVA Object Oriented ConceptsJava in...
分类:
编程语言 时间:
2014-06-03 16:13:26
阅读次数:
355
Tough core Java interview questions and
answersWhat is tough core java interview question ? Why do people look for tough
Java questions before going f...
分类:
编程语言 时间:
2014-05-26 12:41:29
阅读次数:
371
剑指offer上的第21题,之前在Cracking the Coding interview上做过,思路参考这里,这次写了测试函数,在九度OJ上测试通过。
题目描述:
定义栈的数据结构,请在该类型中实现一个能够得到栈最小元素的min函数。
输入:
输入可能包含多个测试样例,输入以EOF结束。
对于每个测试案例,输入的第一行为一个整数n(1<=n<=1000000), n代表将要输入的操作的步骤数。
接下来有n行,每行开始有一个字母Ci。
Ci=’s’时,接下有一个数字k,代表将k压入栈。
Ci=’o’时,...
分类:
其他好文 时间:
2014-05-22 07:15:30
阅读次数:
318
链表结点类型定义:1 class Node {2 public:3 int data = 0;4
Node *next = nullptr;5 6 Node(int d) {7 data = d;8 }9 };快行指针(runner)技巧:同时...
分类:
编程语言 时间:
2014-05-21 04:26:19
阅读次数:
444