由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 还是career cup
相关主题
问一道crack tech interview里面的题职业杯9.10堆盒子。答案的最后一句为啥返回clone();
Leetcode: Symmetric Tree有没有好的iterative的解法?小弟求问LinkedIn那道Deep Iterator的题
Software Engineer - 4G Protocol Stack - Multiple positons/levelsinorder traversal的空间复杂度是O(N) 还是O(logN)?
请教一道题我来问个面经:打印binary tree 从root到leaf的所有path
问个简单清楚的google题,但我不会...一道面试题
Amazon最近电面面经Char x[] = "abc"; 是在heap还是stack上? (转载)
请教leetcode里面如何使用ArrayList, Stack,Queue也问两个算法题
有谁给讲讲amortized time吗请问怎么用Class实现Stack
相关话题的讨论汇总
话题: stack话题: should话题: cup话题: career话题: stacks
进入JobHunting版参与讨论
1 (共1页)
z**********8
发帖数: 229
1
想咨询下,career cup里类似这样的题目:
Imagine a (literal) stack of plates. If the stack gets too high, it might
topple. Therefore,in real life, we would likely start a new stack when the
previous stack exceeds some threshold. Implement a data structure
SetOfStacks that mimics this. SetOf-Stacks should be composed of several
stacks, and should create a new stack once the previous one exceeds capacity
. SetOfStacks.push() and SetOfStacks.pop() should behave identically to a
single stack (that is, pop() should return the same values as it would if
there were just a single stack).
还有什么Towers of Hanoi,一般大公司比如AM这类的,考得多么?感觉这些现场写都
蛮难的啊~~要考虑的东西挺多的(尤指phone interview)
p*****2
发帖数: 21240
2

capacity
这道题感觉好像不算难。用个ArrayList应该就可以了吧。

【在 z**********8 的大作中提到】
: 想咨询下,career cup里类似这样的题目:
: Imagine a (literal) stack of plates. If the stack gets too high, it might
: topple. Therefore,in real life, we would likely start a new stack when the
: previous stack exceeds some threshold. Implement a data structure
: SetOfStacks that mimics this. SetOf-Stacks should be composed of several
: stacks, and should create a new stack once the previous one exceeds capacity
: . SetOfStacks.push() and SetOfStacks.pop() should behave identically to a
: single stack (that is, pop() should return the same values as it would if
: there were just a single stack).
: 还有什么Towers of Hanoi,一般大公司比如AM这类的,考得多么?感觉这些现场写都

z**********8
发帖数: 229
3
arraylist是不是java自带的?这题用C++怎么做?我在建stack的时候就老说我错误,
好像是指针的问题,还在debug中

【在 p*****2 的大作中提到】
:
: capacity
: 这道题感觉好像不算难。用个ArrayList应该就可以了吧。

l*****a
发帖数: 14598
4
arrayList in JAVA equals to vector in c++

【在 z**********8 的大作中提到】
: arraylist是不是java自带的?这题用C++怎么做?我在建stack的时候就老说我错误,
: 好像是指针的问题,还在debug中

l*********8
发帖数: 4642
5
c++里面可以用 stack < stack >
z**********8
发帖数: 229
6
谢谢懂了~

【在 l*********8 的大作中提到】
: c++里面可以用 stack < stack >
z**********8
发帖数: 229
7
谢谢懂了~

【在 l*****a 的大作中提到】
: arrayList in JAVA equals to vector in c++
1 (共1页)
进入JobHunting版参与讨论
相关主题
请问怎么用Class实现Stack问个简单清楚的google题,但我不会...
一个facebook面试题Amazon最近电面面经
白板代码,支持O(1)时间GetMin的stack请教leetcode里面如何使用ArrayList, Stack,Queue
请问一下啥是static/dynamic heap?有谁给讲讲amortized time吗
问一道crack tech interview里面的题职业杯9.10堆盒子。答案的最后一句为啥返回clone();
Leetcode: Symmetric Tree有没有好的iterative的解法?小弟求问LinkedIn那道Deep Iterator的题
Software Engineer - 4G Protocol Stack - Multiple positons/levelsinorder traversal的空间复杂度是O(N) 还是O(logN)?
请教一道题我来问个面经:打印binary tree 从root到leaf的所有path
相关话题的讨论汇总
话题: stack话题: should话题: cup话题: career话题: stacks