527 | 620 | 884 | 909 | 32 | 927 | 276 | 411 | 322 | 445 |
32 | 276 | 322 | 620 | 884 | 927 | 909 | 411 | 527 | 445 |
884 | 909 | 32 | 527 | 620 | 927 | 276 | 411 | 322 | 445 |
527 | 884 | 909 | 32 | 620 | 927 | 276 | 411 | 322 | 445 |
(SORRY! We didn't do radix sort this year!) |
276 | 32 | 322 | 445 | 411 | 527 | 620 | 909 | 927 | 884 |
public int getFrequency(T item) { int count = 0; Node cur = first; while (cur != null) { if (cur.data.equals(item)) { ++count; } cur = cur.next; } return count; }
public int Q(int n) { if (n < 3) { return n; } else { return Q(n – Q(n-1)) + Q(n – Q(n-2)); } }
public interface MyADT { public void showValues(); public boolean hasZeroValue(); public int getZeroLocation(); public double solve(int location); }
public static <T extends <? super T>> T maxElement(T[] arr) { T result = arr[0]; for (int i = 1; i <= arr.length; ++i) { if (result.compareTo(arr[i]) > 0) { result = arr[i]; } } return result; }
+ | + |
/ + |
/ + |
* + |
* + |
- |
( - |
( - |
+ ( - |
+ ( - |
- | - |