CC150 第五版10.3 Given a sorted array of n integers that has been rotated an unknown number of times, write code to find an element in the array. You may assu ...
第一次刷CC150,网上看了一个CC150 50题的重点,是刷重点呢还是都刷了呢?欢迎小伙伴交流下刷题心得!
要求:1.JAVA写的2.有main函数和test case3尽可能多的注释推荐一下哪位大神的博客也行啊
最近在找工作,发现刷题还是有必要的,leetcode有题库OJ,可以网上刷题。大家说的CC150是不是指的是Cracking the Coding Interview这本书?careercup是不是没有网上 ...
if(root==null) return;不是递归的终止条件吧,是检查root是否为空的吧?递归的终止条件应该是root.visited==true吧,图怎么可能会有节点的adjcent为空的情况呢?
http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=100496&extra=page%3D2%26filter%3Dauthor%26orderby%3Ddateline%26typeid%3D202%26typeid%3D202%26orderb ...
CC150 3.7 adopt The Oldest Animal题目:[hr] An animal shelter holds only dogs and cats, and operates on a strictly "first in, first out" basis. People must ...
用C++在刷ctci,第一章第五题有些疑问。书里答案是java的,而且不用string buffer的方法没有check compressed后的string长度是否更短,用了string buffer的方法,我不明白 ...
题目在这:http://www.1point3acres.com/bbs/ ... 6orderby%3Ddatelinecode:这个遍历和preorder不是一样的吗?每个node走一次应该是O(N)啊,可是答案是n*logn,为 ...
Careercup 4.9,You are given a binary tree in which each node contains a value. Design an algorithm to print all paths which sum up to that value. Note that it c ...
我偶然看到一个大牛这么写:我以前都没limit这种啊
https://github.com/gaylemcd/ctci/blob/master/java/Chapter%204/Question4_2/Question.java这是答案的github,我感觉她没有设置方向哎
http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=101036&extra=page%3D2%26filter%3Dauthor%26orderby%3Ddateline%26typeid%3D202%26typeid%3D202%26orderb ...
getHeight递归调用所有的节点为O(N),isBalanced也是O(N),嵌套进去应该是O(N×N)吧,为什么答案写的是O(N×log(N))?
求深入浅出的,实在是蒙了,A child is running up a staircase with n steps, and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count ...
[code]public class minStack
进入debug的时候有bug,实在找不到,求助大家1.Node.java2.MylinkedList.java[code]package Chapter2; //Singly Linked Listpublic class MyLinkedList {publi ...
我想用java自带的Linkedlist类,这样简洁一些,但是运行有错误,很简单的一个问题都错了,还不知道错在哪儿,太打击人了。。。另外再问一下,大家平时写链表的题目用ja ...
http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=100497&fromuid=1072782.4 Write code to partition a linked list around a value x, such that al ...
我咋都是黑色,不变色呢