8.3 Design a musical jukebox using object-oriented principles.CareerCup这书实在是太不负责任了,就写了个半调子的程序,说是完整版也可以下载到,但是我怎么找不到,谁知道在哪里下载请告诉博主,多谢啦~class Song;class ...
分类:
其他好文 时间:
2015-09-07 08:18:43
阅读次数:
176
8.2 Imagine you have a call center with three levels of employees: respondent, manager, and director. An incoming telephone call must be first allocat...
分类:
其他好文 时间:
2015-09-06 14:25:27
阅读次数:
192
7.7 Design an algorithm to find the kth number such that the only prime factors are 3,5, and 7.这道题跟之前LeetCode的那道Ugly Number II 丑陋数之二基本没有啥区别,具体讲解可参见那篇,...
分类:
其他好文 时间:
2015-09-03 23:26:06
阅读次数:
466
7.6 Given a two-dimensional graph with points on it, find a line which passes the most number of points.这道题给了我们许多点,让我们求经过最多点的一条直线。给之前那道7.5 A Line Cut ...
分类:
其他好文 时间:
2015-09-03 00:43:18
阅读次数:
215
7.5 Given two squares on a two-dimensional plane, find a line that would cut these two squares in half. Assume that the top and the bottom sides of th...
分类:
其他好文 时间:
2015-09-01 08:03:06
阅读次数:
191
7.4 Write methods to implement the multiply, subtract, and divide operations for integers. Use only the add operator.这道题让我们实现乘法加法和除法,而且规定了只能使用加法。那么我们先...
分类:
其他好文 时间:
2015-08-30 06:32:21
阅读次数:
142
7.3 Given two lines on a Cartesian plane, determine whether the two lines would intersect.这道题说是在笛卡尔坐标系中,让我们确定两条直线是否相交。那么我们首先要写个直线的类来表示直线,最常见的表示方法为y=kx...
分类:
其他好文 时间:
2015-08-29 07:26:52
阅读次数:
151
7.2 There are three ants on different vertices of a triangle. What is the probability of collision (between any two or all of them) if they start walk...
分类:
其他好文 时间:
2015-08-28 12:39:05
阅读次数:
138
7.1 You have a basketball hoop and someone says that you can play one of two games.Game 1: You get one shot to make the hoop.Game 2: You get three sho...
分类:
其他好文 时间:
2015-08-28 10:58:57
阅读次数:
178
6.6 There are 100 closed lockers in a hallway. A man begins by opening all 100 lockers. Next, he closes every second locker. Then, on his third pass, ...
分类:
其他好文 时间:
2015-08-27 12:54:28
阅读次数:
152