6.7 Suppose, in developing the VeryLongInt class, we decide that digits will contain the integer in reverse order. For example, if the constructor call is: VeryLongInt veryLong = new VeryLongInt ("386"); we would have (Integer elements with values) 6, 8, 3 in positions 0 through 2, respectively of digits. Re-design this constructor so that worstTime(n) is still linear in n. | |
| View Solution | |
| << Back | Next >> |