码迷,mamicode.com
首页 >  
搜索关键字:careercup    ( 212个结果
[CareerCup] 6.5 Drop Eggs 扔鸡蛋问题
6.5 There is a building of 100 floors. If an egg drops from the Nth floor or above, it will break. If it's dropped from any floor below, it will not b...
分类:其他好文   时间:2015-08-27 12:42:20    阅读次数:125
[CareerCup] 5.7 Find Missing Integer 查找丢失的数
5.7 An array A contains all the integers from 0 to n, except for one number which is missing. In this problem, we cannot access an entire integer in A...
分类:其他好文   时间:2015-08-21 13:13:09    阅读次数:205
[CareerCup] 5.6 Swap Odd and Even Bits 交换奇偶位
5.6 Write a program to swap odd and even bits in an integer with as few instructions as possible (e.g., bit 0 and bit 1 are swapped, bit 2 and bit 3 a...
分类:其他好文   时间:2015-08-20 07:58:25    阅读次数:111
[CareerCup] 5.2 Binary Representation of Real Number 实数的二进制表示
5.2 Given a real number between 0 and 1 (e.g., 0.72) that is passed in as a double, print the binary representation. If the number cannot be represent...
分类:其他好文   时间:2015-08-11 15:57:26    阅读次数:122
[CareerCup] 5.1 Insert Bits 插入位
5.1 You are given two 32-bit numbers, N and M, and two bit positions, land j. Write a method to insert M into N such that M starts at bit j and ends a...
分类:其他好文   时间:2015-08-10 09:25:49    阅读次数:110
[CareerCup] 4.9 All Paths Sum 所有路径和
4.9 You are given a binary tree in which each node contains a value. Design an algorithm to print all paths which sum to a given value. The path does ...
分类:其他好文   时间:2015-08-09 10:40:51    阅读次数:122
[CareerCup] 4.8 Contain Tree 包含树
4.8 You have two very large binary trees: Tl, with millions of nodes, and T2, with hundreds of nodes. Create an algorithm to decide if T2 is a subtree...
分类:其他好文   时间:2015-08-08 12:01:40    阅读次数:103
[CareerCup] 4.6 Find Next Node in a BST 寻找二叉搜索树中下一个节点
4.6 Write an algorithm to find the'next'node (i.e., in-order successor) of a given node in a binary search tree. You may assume that each node has a l...
分类:其他好文   时间:2015-08-07 00:10:52    阅读次数:112
[CareerCup] 4.5 Validate Binary Search Tree 验证二叉搜索树
4.5 Implement a function to check if a binary tree is a binary search tree.LeetCode上的原理,请参见我之前的博客Validate Binary Search Tree 验证二叉搜索树。
分类:其他好文   时间:2015-08-04 00:37:06    阅读次数:97
[CareerCup] 4.4 Create List at Each Depth of Binary Tree 二叉树的各层创建链表
4.4 Given a binary tree, design an algorithm which creates a linked list of all the nodes at each depth (e.g., if you have a tree with depth D, you'll...
分类:其他好文   时间:2015-08-02 00:55:41    阅读次数:137
212条   上一页 1 ... 7 8 9 10 11 ... 22 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!