刷几遍?看答案刷还是自己苦想?刷到什么程度上leetcode?那个网站有什么用?
5.3 Given a positive integer, print the next smallest and the next largest number that have the same number of 7 bits in their binary representation.回复 ...
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 not need t ...
9.2 Imagine a robot sitting on the upper left comer of an X by Ygrid. The robot can only move in two directions: right and down. How many possible paths are the ...
9.1 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 how many possible ways ...
4.8 You have two very large binary trees: T1, with millions of nodes, and T2, with hundreds of nodes. Create an algorithm to decide if T2 is a subtree of Tl.A ...
正准备开始看.先问问刷一遍CC150的话大约总共要多少时间啊?好有个计划。谢谢!
5.8 A monochrome screen is stored as a single array of bytes, allowing eight consecutive pixels to be stored in one byte. The screen has width w, where w is div ...
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! are swapped, bit 2 and bit 3 are swapped, ...
5.4 Explain what the following code does: ((n & (n-1)) == 0).回复解法可以按照以下格式来【解题思路】【时间复杂度】【空间复杂度】【gist link】------ ...
5.5 Write a function to determine the number of bits required to convert integer A to integer B.回复解法可以按照以下格式来【解题思路】【时间复杂度】 ...
5.2 Given a real number between 0 and 7 (e.g., 0.72) that is passed in as a double, print the binary representation. If the number cannot be represented accurat ...
5.1 You are given two 32-bit numbers, N andM, and two bit positions, i and j. Write a method to insert M into Nsuch that M starts at bit j and ends at bit i. Yo ...
5.7 An array A contains all the integers from 0 through n, except for one number which is missing. In this problem, we cannot access an entire integer in A with ...
4.5 Implement a function to check if a binary tree is a binary search tree.回复解法可以按照以下格式来Notice:1、记得在程序注释中表明自己算法的时间、 ...
大家好,没有上过cs的课,尤其是OS和networking的东西基本上都不懂。在CC150里面有,三章: computer networking, low level, thread and deadlock。这些要怎么在短时间内 ...
4.7 Design an algorithm and write code to find the first common ancestor of two nodes in a binary tree. Avoid storing additional nodes in a data structure. NOTE ...
20.13 Given a dictionary of millions of words, give an algorithm to find the largest possible rectangle of letters such that every row forms a word (reading lef ...
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 link to i ...
天天看盗版PDF眼睛难受,亚麻真威武,45块......我看了一下,和原版没差别http://www.amazon.cn/图书/dp/B00G8VOQOG/ref=pd_cp_b_0/476-5418569-6936423