13. ArrayList Quiz
-
Change the sequence “I” “run” “fast” to “You” “and” “I” “run” “fast” every place that the former occurs.
public static void runfast(ArrayList<String> data)
-
No mice. Remove every “mouse” (or “mice”) in the input.
public static void noMouse(ArrayList<String> school)
Advanced
Read Wolfram’s numbering scheme for one dimensional cellular automata. Write a function that creates a new ArrayList according to a given rule number.
public static ArrayList<Boolean> evolve (int rule, ArrayList<Boolean> data)