码迷,mamicode.com
首页 >  
搜索关键字:careercup    ( 212个结果
[CareerCup] 4.3 Create Minimal Binary Search Tree 创建最小二叉搜索树
4.3 Given a sorted (increasing order) array with unique integer elements, write an algorithm to create a binary search tree with minimal height.这道题给了我...
分类:其他好文   时间:2015-08-01 01:03:53    阅读次数:118
[CareerCup] 4.2 Route between Two Nodes in Directed Graph 有向图中两点的路径
4.2 Given a directed graph, design an algorithm to find out whether there is a route between two nodes.LeetCode和CareerCup中关于图的题都不是很多,LeetCode中只有三道,分别是...
分类:其他好文   时间:2015-07-31 01:12:47    阅读次数:199
[CareerCup] 4.1 Balanced Binary Tree 平衡二叉树
4.1 Implement a function to check if a binary tree is balanced. For the purposes of this question, a balanced tree is defined to be a tree such that t...
分类:其他好文   时间:2015-07-29 13:46:49    阅读次数:99
[CareerCup] 3.6 Sort Stack 栈排序
3.6 Write a program to sort a stack in ascending order (with biggest items on top). You may use at most one additional stack to hold items, but you ma...
分类:编程语言   时间:2015-07-27 07:04:04    阅读次数:162
[CareerCup] 3.5 Implement Queue using Two Stacks 使用两个栈来实现队列
3.5 Implement a MyQueue class which implements a queue using two stacks.LeetCode上的原题,请参见我之前的博客Implement Queue using Stacks 用栈来实现队列。
分类:其他好文   时间:2015-07-27 01:47:23    阅读次数:108
[CareerCup] 3.4 Towers of Hanoi 汉诺塔
3.4 In the classic problem of the Towers of Hanoi, you have 3 towers and N disks of different sizes which can slide onto any tower. The puzzle starts ...
分类:其他好文   时间:2015-07-26 12:25:22    阅读次数:122
[CareerCup] 3.3 Set of Stacks 多个栈
3.3 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 ...
分类:其他好文   时间:2015-07-26 08:35:16    阅读次数:122
[CareerCup] 3.1 Implement Three Stacks using Array 使用数组来实现三个栈
3.1 Describe how you could use a single array to implement three stacks.这道题让我们用一个数组来实现三个栈,书上给了两种方法,第一种方法是定长分割 Fixed Division,就是每个栈的长度相同,用一个公用的一位数组buff...
分类:编程语言   时间:2015-07-25 13:47:15    阅读次数:107
[CareerCup] 3.2 Min Stack 最小栈
3.2 How would you design a stack which, in addition to push and pop, also has a function min which returns the minimum element? Push, pop and min shou...
分类:其他好文   时间:2015-07-25 13:46:14    阅读次数:120
[CareerCup] 2.7 Palindrome Linked List 回文链表
2.7 Implement a function to check if a linked list is a palindrome.LeetCode上的原题,参见我之前的博客Palindrome Linked List 回文链表。
分类:其他好文   时间:2015-07-22 22:22:58    阅读次数:108
212条   上一页 1 ... 8 9 10 11 12 ... 22 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!