10.1 Imagine you are building some sort of service that will be called by up to 1000 client applications to get simple end-of-day stock price informat...
分类:
其他好文 时间:
2015-10-02 07:53:54
阅读次数:
217
9.8 Given an infinite number of quarters (25 cents), dimes (10 cents), nickels (5 cents) and pennies (1 cent), write code to calculate the number of w...
分类:
其他好文 时间:
2015-09-26 14:44:12
阅读次数:
534
9.7 Implement the "paint fill" function that one might see on many image editing programs. That is, given a screen (represented by a two-dimensional a...
分类:
其他好文 时间:
2015-09-23 11:47:21
阅读次数:
219
9.6 Implement an algorithm to print all valid (e.g., properly opened and closed) combinations of n-pairs of parentheses.EXAMPLEInput: 3Output: ((())),...
分类:
其他好文 时间:
2015-09-22 14:20:34
阅读次数:
133
9.3 A magic index in an array A[0.. .n-1] is defined to be an index such that A[i] = i. Given a sorted array of distinct integers, write a method to f...
分类:
其他好文 时间:
2015-09-18 11:50:05
阅读次数:
125
9.2 Imagine a robot sitting on the upper left corner of an X by Y grid. The robot can only move in two directions: right and down. How many possible p...
分类:
移动开发 时间:
2015-09-18 00:47:15
阅读次数:
208
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 pos...
分类:
其他好文 时间:
2015-09-17 06:27:41
阅读次数:
142
8.7 Explain how you would design a chat server. In particular, provide details about the various backend components, classes, and methods. What would ...
分类:
其他好文 时间:
2015-09-12 06:21:54
阅读次数:
163
8.6 Implement a jigsaw puzzle. Design the data structures and explain an algorithm to solve the puzzle. You can assume that you have a f itsWith metho...
分类:
其他好文 时间:
2015-09-09 13:08:47
阅读次数:
204
8.4 Design a parking lot using object-oriented principles.这道题让我们实现一个停车位的数据结构,由于题目没给任何多余的信息,所以自由度很大,比如能停放什么种类的车,或是否是多层的等等。根据书中描述,这里我们做如下假设:1. 停车场有多层,每层...
分类:
其他好文 时间:
2015-09-07 12:35:23
阅读次数:
230