SYMBOL INDEX (2741 symbols across 585 files) FILE: Java/Big O/Example_16/Example.java class Example (line 3) | public class Example { method powersOf2 (line 5) | public static int powersOf2(int n) { method main (line 19) | public static void main(String[] args) { FILE: Java/Big O/QVI_11_Print_Sorted_Strings/Question.java class Question (line 4) | public class Question { method printSortedStrings (line 8) | public static void printSortedStrings(int remaining) { method printSortedStrings (line 12) | public static void printSortedStrings(int remaining, String prefix) { method isInOrder (line 25) | public static boolean isInOrder(String s) { method ithLetter (line 37) | public static char ithLetter(int i) { method main (line 41) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_01_Is_Unique/QuestionA.java class QuestionA (line 3) | public class QuestionA { method isUniqueChars (line 4) | public static boolean isUniqueChars(String str) { method main (line 17) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_01_Is_Unique/QuestionB.java class QuestionB (line 3) | public class QuestionB { method isUniqueChars (line 6) | public static boolean isUniqueChars(String str) { method main (line 19) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_01_Is_Unique/Tester.java class Tester (line 3) | public class Tester { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_02_Check_Permutation/QuestionA.java class QuestionA (line 3) | public class QuestionA { method sort (line 4) | public static String sort(String s) { method permutation (line 10) | public static boolean permutation(String s, String t) { method main (line 14) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_02_Check_Permutation/QuestionB.java class QuestionB (line 3) | public class QuestionB { method permutation (line 4) | public static boolean permutation(String s, String t) { method main (line 22) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_03_URLify/Question.java class Question (line 5) | public class Question { method replaceSpaces (line 7) | public static void replaceSpaces(char[] str, int trueLength) { method findLastCharacter (line 29) | public static int findLastCharacter(char[] str) { method main (line 38) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_04_Palindrome_Permutation/Common.java class Common (line 3) | public class Common { method getCharNumber (line 5) | public static int getCharNumber(Character c) { method buildCharFrequencyTable (line 16) | public static int[] buildCharFrequencyTable(String phrase) { FILE: Java/Ch 01. Arrays and Strings/Q1_04_Palindrome_Permutation/QuestionA.java class QuestionA (line 3) | public class QuestionA { method checkMaxOneOdd (line 4) | public static boolean checkMaxOneOdd(int[] table) { method isPermutationOfPalindrome (line 17) | public static boolean isPermutationOfPalindrome(String phrase) { method main (line 22) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_04_Palindrome_Permutation/QuestionB.java class QuestionB (line 3) | public class QuestionB { method isPermutationOfPalindrome (line 5) | public static boolean isPermutationOfPalindrome(String phrase) { method main (line 23) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_04_Palindrome_Permutation/QuestionC.java class QuestionC (line 3) | public class QuestionC { method toggle (line 5) | public static int toggle(int bitVector, int index) { method createBitVector (line 19) | public static int createBitVector(String phrase) { method checkAtMostOneBitSet (line 30) | public static boolean checkAtMostOneBitSet(int bitVector) { method isPermutationOfPalindrome (line 34) | public static boolean isPermutationOfPalindrome(String phrase) { method main (line 39) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_04_Palindrome_Permutation/Tester.java class Tester (line 3) | public class Tester { method main (line 6) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_05_One_Away/QuestionA.java class QuestionA (line 3) | public class QuestionA { method oneEditReplace (line 5) | public static boolean oneEditReplace(String s1, String s2) { method oneEditInsert (line 20) | public static boolean oneEditInsert(String s1, String s2) { method oneEditAway (line 37) | public static boolean oneEditAway(String first, String second) { method main (line 48) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_05_One_Away/QuestionB.java class QuestionB (line 3) | public class QuestionB { method oneEditAway (line 4) | public static boolean oneEditAway(String first, String second) { method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_05_One_Away/Tester.java class Tester (line 3) | public class Tester { method test (line 5) | public static void test(String a, String b, boolean expected) { method main (line 16) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_06_String_Compression/QuestionA.java class QuestionA (line 3) | public class QuestionA { method compressBad (line 4) | public static String compressBad(String str) { method main (line 19) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_06_String_Compression/QuestionB.java class QuestionB (line 3) | public class QuestionB { method compress (line 4) | public static String compress(String str) { method main (line 20) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_06_String_Compression/QuestionC.java class QuestionC (line 3) | public class QuestionC { method compress (line 4) | public static String compress(String str) { method countCompression (line 23) | public static int countCompression(String str) { method main (line 38) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_06_String_Compression/Tester.java class Tester (line 3) | public class Tester { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_07_Rotate_Matrix/Question.java class Question (line 5) | public class Question { method rotate (line 7) | public static boolean rotate(int[][] matrix) { method main (line 34) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_08_Zero_Matrix/QuestionA.java class QuestionA (line 5) | public class QuestionA { method nullifyRow (line 6) | public static void nullifyRow(int[][] matrix, int row) { method nullifyColumn (line 12) | public static void nullifyColumn(int[][] matrix, int col) { method setZeros (line 18) | public static void setZeros(int[][] matrix) { method matricesAreEqual (line 47) | public static boolean matricesAreEqual(int[][] m1, int[][] m2) { method cloneMatrix (line 62) | public static int[][] cloneMatrix(int[][] matrix) { method main (line 72) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_08_Zero_Matrix/QuestionB.java class QuestionB (line 5) | public class QuestionB { method nullifyRow (line 6) | public static void nullifyRow(int[][] matrix, int row) { method nullifyColumn (line 12) | public static void nullifyColumn(int[][] matrix, int col) { method setZeros (line 18) | public static void setZeros(int[][] matrix) { method matricesAreEqual (line 73) | public static boolean matricesAreEqual(int[][] m1, int[][] m2) { method cloneMatrix (line 88) | public static int[][] cloneMatrix(int[][] matrix) { method main (line 98) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_08_Zero_Matrix/Tester.java class Tester (line 5) | public class Tester { method matricesAreEqual (line 6) | public static boolean matricesAreEqual(int[][] m1, int[][] m2) { method cloneMatrix (line 21) | public static int[][] cloneMatrix(int[][] matrix) { method main (line 31) | public static void main(String[] args) { FILE: Java/Ch 01. Arrays and Strings/Q1_09_String_Rotation/Question.java class Question (line 3) | public class Question { method isSubstring (line 4) | public static boolean isSubstring(String big, String small) { method isRotation (line 12) | public static boolean isRotation(String s1, String s2) { method main (line 23) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_01_Remove_Dups/QuestionA.java class QuestionA (line 6) | public class QuestionA { method deleteDups (line 7) | public static void deleteDups(LinkedListNode n) { method main (line 21) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_01_Remove_Dups/QuestionB.java class QuestionB (line 5) | public class QuestionB { method deleteDups (line 6) | public static void deleteDups(LinkedListNode head) { method main (line 22) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_01_Remove_Dups/QuestionC.java class QuestionC (line 5) | public class QuestionC { method deleteDups (line 6) | public static void deleteDups(LinkedListNode head) { method main (line 39) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_01_Remove_Dups/Tester.java class Tester (line 5) | public class Tester { method main (line 7) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_02_Return_Kth_To_Last/QuestionA.java class QuestionA (line 5) | public class QuestionA { method printKthToLast (line 7) | public static int printKthToLast(LinkedListNode head, int k) { method main (line 18) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_02_Return_Kth_To_Last/QuestionB.cpp type node (line 4) | struct node { function node (line 9) | node* nthToLast(node* head, int k, int& i) { function node (line 21) | node* nthToLast(node* head, int k) { function node (line 26) | node* createList(int count) { function printList (line 39) | void printList(node* head) { function main (line 46) | int main() { FILE: Java/Ch 02. Linked Lists/Q2_02_Return_Kth_To_Last/QuestionC.java class QuestionC (line 5) | public class QuestionC { class Index (line 6) | public static class Index { method kthToLast (line 10) | public static LinkedListNode kthToLast(LinkedListNode head, int k) { method kthToLast (line 15) | public static LinkedListNode kthToLast(LinkedListNode head, int k, Ind... method main (line 27) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_02_Return_Kth_To_Last/QuestionD.java class QuestionD (line 5) | public class QuestionD { method nthToLast (line 7) | public static LinkedListNode nthToLast(LinkedListNode head, int k) { method main (line 26) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_02_Return_Kth_To_Last/Tester.java class Tester (line 5) | public class Tester { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_03_Delete_Middle_Node/Question.java class Question (line 6) | public class Question { method deleteNode (line 8) | public static boolean deleteNode(LinkedListNode n) { method main (line 18) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_04_Partition/Question.java class Question (line 5) | public class Question { method partition (line 7) | public static LinkedListNode partition(LinkedListNode node, int x) { method main (line 46) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_04_Partition/QuestionB.java class QuestionB (line 5) | public class QuestionB { method partition (line 7) | public static LinkedListNode partition(LinkedListNode node, int x) { method main (line 39) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_04_Partition/QuestionC.java class QuestionC (line 5) | public class QuestionC { method partition (line 7) | public static LinkedListNode partition(LinkedListNode node, int x) { method main (line 30) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_04_Partition/Tester.java class Tester (line 5) | public class Tester { method createLinkedList (line 7) | public static LinkedListNode createLinkedList() { method main (line 18) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_05_Sum_Lists/PartialSum.java class PartialSum (line 5) | public class PartialSum { FILE: Java/Ch 02. Linked Lists/Q2_05_Sum_Lists/QuestionA.java class QuestionA (line 6) | public class QuestionA { method addLists (line 7) | private static LinkedListNode addLists(LinkedListNode l1, LinkedListNo... method addLists (line 11) | private static LinkedListNode addLists(LinkedListNode l1, LinkedListNo... method linkedListToInt (line 34) | public static int linkedListToInt(LinkedListNode node) { method main (line 42) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_05_Sum_Lists/QuestionB.java class QuestionB (line 4) | public class QuestionB { method length (line 5) | private static int length(LinkedListNode l) { method addListsHelper (line 13) | private static PartialSum addListsHelper(LinkedListNode l1, LinkedList... method addLists (line 26) | private static LinkedListNode addLists(LinkedListNode l1, LinkedListNo... method padList (line 43) | private static LinkedListNode padList(LinkedListNode l, int padding) { method insertBefore (line 51) | private static LinkedListNode insertBefore(LinkedListNode list, int da... method linkedListToInt (line 59) | public static int linkedListToInt(LinkedListNode node) { method main (line 68) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_06_Palindrome/QuestionA.java class QuestionA (line 5) | public class QuestionA { method isPalindrome (line 6) | public static boolean isPalindrome(LinkedListNode head) { method reverseAndClone (line 11) | public static LinkedListNode reverseAndClone(LinkedListNode node) { method isEqual (line 22) | public static boolean isEqual(LinkedListNode one, LinkedListNode two) { method main (line 33) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_06_Palindrome/QuestionB.java class QuestionB (line 7) | public class QuestionB { method isPalindrome (line 8) | public static boolean isPalindrome(LinkedListNode head) { method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_06_Palindrome/QuestionC.java class QuestionC (line 5) | public class QuestionC { class Result (line 6) | public static class Result { method Result (line 9) | public Result(LinkedListNode n, boolean res) { method isPalindromeRecurse (line 15) | public static Result isPalindromeRecurse(LinkedListNode head, int leng... method lengthOfList (line 40) | public static int lengthOfList(LinkedListNode n) { method isPalindrome (line 49) | public static boolean isPalindrome(LinkedListNode head) { method main (line 55) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_06_Palindrome/Tester.java class Tester (line 5) | public class Tester { method main (line 7) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_07_Intersection/Question.java class Question (line 6) | public class Question { class Result (line 8) | public static class Result { method Result (line 11) | public Result(LinkedListNode tail, int size) { method getTailAndSize (line 17) | public static Result getTailAndSize(LinkedListNode list) { method getKthNode (line 29) | public static LinkedListNode getKthNode(LinkedListNode head, int k) { method findIntersection (line 38) | public static LinkedListNode findIntersection(LinkedListNode list1, Li... method main (line 67) | public static void main(String[] args) { FILE: Java/Ch 02. Linked Lists/Q2_08_Loop_Detection/Question.java class Question (line 5) | public class Question { method FindBeginning (line 7) | public static LinkedListNode FindBeginning(LinkedListNode head) { method main (line 38) | public static void main(String[] args) { FILE: Java/Ch 03. Stacks and Queues/Introduction/MyQueue.java class MyQueue (line 5) | public class MyQueue { class QueueNode (line 6) | private static class QueueNode { method QueueNode (line 10) | public QueueNode(T data) { method add (line 18) | public void add(T item) { method remove (line 29) | public T remove() { method peek (line 39) | public T peek() { method isEmpty (line 44) | public boolean isEmpty() { FILE: Java/Ch 03. Stacks and Queues/Introduction/MyStack.java class MyStack (line 5) | public class MyStack { class StackNode (line 6) | private static class StackNode { method StackNode (line 10) | public StackNode(T data) { method getData (line 14) | public T getData() { method pop (line 21) | public T pop() { method push (line 28) | public void push(T item) { method peek (line 34) | public T peek() { method isEmpty (line 39) | public boolean isEmpty() { FILE: Java/Ch 03. Stacks and Queues/Introduction/QueueTester.java class QueueTester (line 9) | public class QueueTester { method main (line 11) | public static void main(String[] args) { FILE: Java/Ch 03. Stacks and Queues/Introduction/StackTester.java class StackTester (line 8) | public class StackTester { method main (line 10) | public static void main(String[] args) { FILE: Java/Ch 03. Stacks and Queues/Q3_01_Three_in_One/FixedMultiStack.java class FixedMultiStack (line 7) | public class FixedMultiStack { method FixedMultiStack (line 13) | public FixedMultiStack(int stackSize) { method push (line 20) | public void push(int stackNum, int value) throws FullStackException { method pop (line 32) | public int pop(int stackNum) { method peek (line 45) | public int peek(int stackNum) { method isEmpty (line 53) | public boolean isEmpty(int stackNum) { method isFull (line 58) | public boolean isFull(int stackNum) { method indexOfTop (line 63) | private int indexOfTop(int stackNum) { method getValues (line 69) | public int[] getValues() { method getStackValues (line 73) | public int[] getStackValues(int stackNum) { method stackToString (line 81) | public String stackToString(int stackNum) { FILE: Java/Ch 03. Stacks and Queues/Q3_01_Three_in_One/FullStackException.java class FullStackException (line 3) | public class FullStackException extends Exception { method FullStackException (line 6) | public FullStackException(){ method FullStackException (line 10) | public FullStackException(String message){ FILE: Java/Ch 03. Stacks and Queues/Q3_01_Three_in_One/MultiStack.java class MultiStack (line 7) | public class MultiStack { class StackInfo (line 12) | private class StackInfo { method StackInfo (line 14) | public StackInfo(int start, int capacity) { method isWithinStackCapacity (line 22) | public boolean isWithinStackCapacity(int index) { method lastCapacityIndex (line 34) | public int lastCapacityIndex() { method lastElementIndex (line 38) | public int lastElementIndex() { method isFull (line 42) | public boolean isFull() { method isEmpty (line 46) | public boolean isEmpty() { method MultiStack (line 54) | public MultiStack(int numberOfStacks, int defaultSize) { method numberOfElements (line 64) | public int numberOfElements() { method allStacksAreFull (line 73) | public boolean allStacksAreFull() { method adjustIndex (line 78) | private int adjustIndex(int index) { method nextIndex (line 88) | private int nextIndex(int index) { method previousIndex (line 93) | private int previousIndex(int index) { method shift (line 101) | private void shift(int stackNum) { method expand (line 128) | private void expand(int stackNum) { method push (line 137) | public void push(int stackNum, int value) throws FullStackException { method pop (line 156) | public int pop(int stackNum) throws Exception { method peek (line 171) | public int peek(int stackNum) { method getValues (line 176) | public int[] getValues() { method getStackValues (line 180) | public int[] getStackValues(int stackNum) { method stackToString (line 189) | public String stackToString(int stackNum) { FILE: Java/Ch 03. Stacks and Queues/Q3_01_Three_in_One/QuestionA.java class QuestionA (line 5) | public class QuestionA { method printStacks (line 6) | public static void printStacks(FixedMultiStack stacks) { method main (line 10) | public static void main(String [] args) throws Exception { FILE: Java/Ch 03. Stacks and Queues/Q3_01_Three_in_One/QuestionB.java class QuestionB (line 5) | public class QuestionB { method printStacks (line 6) | public static void printStacks(MultiStack stacks) { method main (line 13) | public static void main(String [] args) throws Exception { FILE: Java/Ch 03. Stacks and Queues/Q3_02_Stack_Min/NodeWithMin.java class NodeWithMin (line 3) | class NodeWithMin { method NodeWithMin (line 6) | public NodeWithMin(int v, int min){ FILE: Java/Ch 03. Stacks and Queues/Q3_02_Stack_Min/Question.java class Question (line 3) | public class Question { method main (line 4) | public static void main(String[] args) { FILE: Java/Ch 03. Stacks and Queues/Q3_02_Stack_Min/StackWithMin.java class StackWithMin (line 5) | public class StackWithMin extends Stack { method push (line 6) | public void push(int value) { method min (line 11) | public int min() { FILE: Java/Ch 03. Stacks and Queues/Q3_02_Stack_Min/StackWithMin2.java class StackWithMin2 (line 5) | public class StackWithMin2 extends Stack { method StackWithMin2 (line 8) | public StackWithMin2() { method push (line 12) | public void push(int value){ method pop (line 19) | public Integer pop() { method min (line 27) | public int min() { FILE: Java/Ch 03. Stacks and Queues/Q3_03_Stack_of_Plates/Node.java class Node (line 3) | public class Node { method Node (line 7) | public Node(int value) { FILE: Java/Ch 03. Stacks and Queues/Q3_03_Stack_of_Plates/Question.java class Question (line 3) | public class Question { method main (line 4) | public static void main(String[] args) { FILE: Java/Ch 03. Stacks and Queues/Q3_03_Stack_of_Plates/SetOfStacks.java class SetOfStacks (line 6) | public class SetOfStacks { method SetOfStacks (line 10) | public SetOfStacks(int capacity) { method getLastStack (line 14) | public Stack getLastStack() { method push (line 21) | public void push(int v) { method pop (line 32) | public int pop() { method popAt (line 42) | public int popAt(int index) { method leftShift (line 46) | public int leftShift(int index, boolean removeTop) { method isEmpty (line 60) | public boolean isEmpty() { FILE: Java/Ch 03. Stacks and Queues/Q3_03_Stack_of_Plates/Stack.java class Stack (line 5) | public class Stack { method Stack (line 11) | public Stack(int capacity) { method isFull (line 15) | public boolean isFull() { method join (line 19) | public void join(Node above, Node below) { method push (line 24) | public boolean push(int v) { method pop (line 34) | public int pop() { method isEmpty (line 42) | public boolean isEmpty() { method removeBottom (line 46) | public int removeBottom() { FILE: Java/Ch 03. Stacks and Queues/Q3_04_Queue_via_Stacks/MyQueue.java class MyQueue (line 5) | public class MyQueue { method MyQueue (line 8) | public MyQueue() { method size (line 13) | public int size() { method add (line 17) | public void add(T value) { method shiftStacks (line 25) | private void shiftStacks() { method peek (line 33) | public T peek() { method remove (line 38) | public T remove() { FILE: Java/Ch 03. Stacks and Queues/Q3_04_Queue_via_Stacks/Question.java class Question (line 8) | public class Question { method main (line 9) | public static void main(String[] args) { FILE: Java/Ch 03. Stacks and Queues/Q3_05_Sort_Stack/Question.java class Question (line 7) | public class Question { method mergesort (line 8) | public static Stack mergesort(Stack inStack) { method sort (line 48) | public static void sort(Stack s) { method main (line 65) | public static void main(String [] args) { FILE: Java/Ch 03. Stacks and Queues/Q3_06_Animal_Shelter/Animal.java class Animal (line 3) | public abstract class Animal { method Animal (line 6) | public Animal(String n) { method name (line 10) | public abstract String name(); method setOrder (line 12) | public void setOrder(int ord) { method getOrder (line 16) | public int getOrder() { method isOlderThan (line 20) | public boolean isOlderThan(Animal a) { FILE: Java/Ch 03. Stacks and Queues/Q3_06_Animal_Shelter/AnimalQueue.java class AnimalQueue (line 5) | public class AnimalQueue { method enqueue (line 10) | public void enqueue(Animal a) { method dequeueAny (line 20) | public Animal dequeueAny() { method peek (line 35) | public Animal peek() { method size (line 50) | public int size() { method dequeueDogs (line 54) | public Dog dequeueDogs() { method peekDogs (line 58) | public Dog peekDogs() { method dequeueCats (line 62) | public Cat dequeueCats() { method peekCats (line 66) | public Cat peekCats() { FILE: Java/Ch 03. Stacks and Queues/Q3_06_Animal_Shelter/Cat.java class Cat (line 3) | public class Cat extends Animal { method Cat (line 4) | public Cat(String n) { method name (line 8) | public String name() { FILE: Java/Ch 03. Stacks and Queues/Q3_06_Animal_Shelter/Dog.java class Dog (line 3) | public class Dog extends Animal { method Dog (line 4) | public Dog(String n) { method name (line 8) | public String name() { FILE: Java/Ch 03. Stacks and Queues/Q3_06_Animal_Shelter/Question.java class Question (line 3) | public class Question { method main (line 6) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Introduction/Traversals.java class Traversals (line 5) | public class Traversals { method visit (line 6) | public static void visit(TreeNode node) { method inOrderTraversal (line 12) | public static void inOrderTraversal(TreeNode node) { method preOrderTraversal (line 20) | public static void preOrderTraversal(TreeNode node) { method postOrderTraversal (line 28) | public static void postOrderTraversal(TreeNode node) { method main (line 36) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_01_Route_Between_Nodes/Graph.java class Graph (line 3) | public class Graph { method Graph (line 7) | public Graph() { method addNode (line 12) | public void addNode(Node x) { method getNodes (line 21) | public Node[] getNodes() { FILE: Java/Ch 04. Trees and Graphs/Q4_01_Route_Between_Nodes/Node.java class Node (line 3) | class Node { method Node (line 8) | public Node(String vertex, int adjacentLength) { method addAdjacent (line 14) | public void addAdjacent(Node x) { method getAdjacent (line 22) | public Node[] getAdjacent() { method getVertex (line 25) | public String getVertex() { FILE: Java/Ch 04. Trees and Graphs/Q4_01_Route_Between_Nodes/Question.java class Question (line 5) | public class Question { type State (line 6) | public enum State { method main (line 10) | public static void main(String a[]) method createNewGraph (line 19) | public static Graph createNewGraph() method search (line 42) | public static boolean search(Graph g,Node start,Node end) { FILE: Java/Ch 04. Trees and Graphs/Q4_02_Minimal_Tree/Question.java class Question (line 5) | public class Question { method main (line 6) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_03_List_of_Depths/QuestionBFS.java class QuestionBFS (line 9) | public class QuestionBFS { method createLevelLinkedList (line 11) | public static ArrayList> createLevelLinkedList(Tr... method printResult (line 38) | public static void printResult(ArrayList> result){ method main (line 52) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_03_List_of_Depths/QuestionDFS.java class QuestionDFS (line 9) | public class QuestionDFS { method createLevelLinkedList (line 11) | public static void createLevelLinkedList(TreeNode root, ArrayList> createLevelLinkedList(Tr... method printResult (line 33) | public static void printResult(ArrayList> result){ method main (line 47) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_04_Check_Balanced/QuestionBrute.java class QuestionBrute (line 6) | public class QuestionBrute { method getHeight (line 8) | public static int getHeight(TreeNode root) { method isBalanced (line 15) | public static boolean isBalanced(TreeNode root) { method main (line 28) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_04_Check_Balanced/QuestionImproved.java class QuestionImproved (line 4) | public class QuestionImproved { method checkHeight (line 6) | public static int checkHeight(TreeNode root) { method isBalanced (line 24) | public static boolean isBalanced(TreeNode root) { method main (line 28) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_05_Validate_BST/IntWrapper.java class IntWrapper (line 3) | public class IntWrapper { method IntWrapper (line 4) | public IntWrapper(int m) { FILE: Java/Ch 04. Trees and Graphs/Q4_05_Validate_BST/Question.java class Question (line 5) | public class Question { method checkBST (line 8) | public static boolean checkBST(TreeNode node) { method checkBST (line 13) | public static boolean checkBST(TreeNode n, boolean isLeft) { method main (line 46) | public static void main(String[] args) { method test (line 56) | public static void test() { FILE: Java/Ch 04. Trees and Graphs/Q4_05_Validate_BST/QuestionB.java class QuestionB (line 6) | public class QuestionB { method checkBST (line 7) | public static boolean checkBST(TreeNode n, Integer min, Integer max) { method checkBST (line 21) | public static boolean checkBST(TreeNode n) { method checkBSTAlternate (line 25) | public static boolean checkBSTAlternate(TreeNode n) { method checkBSTAlternate (line 29) | public static boolean checkBSTAlternate(TreeNode n, IntWrapper min, In... method createTestTree (line 61) | public static TreeNode createTestTree() { method main (line 84) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_06_Successor/Question.java class Question (line 5) | public class Question { method inorderSucc (line 7) | public static TreeNode inorderSucc(TreeNode n) { method leftMostChild (line 25) | public static TreeNode leftMostChild(TreeNode n) { method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_07_Build_Order/DFS/Graph.java class Graph (line 6) | public class Graph { method getOrCreateNode (line 10) | public Project getOrCreateNode(String name) { method addEdge (line 20) | public void addEdge(String startName, String endName) { method getNodes (line 26) | public ArrayList getNodes() { FILE: Java/Ch 04. Trees and Graphs/Q4_07_Build_Order/DFS/Project.java class Project (line 6) | public class Project { type State (line 7) | public enum State {COMPLETE, PARTIAL, BLANK} method Project (line 13) | public Project(String n) { method getName (line 17) | public String getName() { method addNeighbor (line 21) | public void addNeighbor(Project node) { method getState (line 28) | public State getState() { method setState (line 32) | public void setState(State st) { method getChildren (line 36) | public ArrayList getChildren() { FILE: Java/Ch 04. Trees and Graphs/Q4_07_Build_Order/DFS/Question.java class Question (line 6) | public class Question { method buildGraph (line 12) | public static Graph buildGraph(String[] projects, String[][] dependenc... method doDFS (line 24) | public static boolean doDFS(Project project, Stack stack) { method orderProjects (line 43) | public static Stack orderProjects(ArrayList projects) { method convertToStringList (line 55) | public static String[] convertToStringList(Stack projects) { method findBuildOrder (line 63) | public static Stack findBuildOrder(String[] projects, String[... method buildOrderWrapper (line 68) | public static String[] buildOrderWrapper(String[] projects, String[][]... method main (line 75) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_07_Build_Order/EdgeRemoval/Graph.java class Graph (line 6) | public class Graph { method getOrCreateNode (line 10) | public Project getOrCreateNode(String name) { method addEdge (line 20) | public void addEdge(String startName, String endName) { method getNodes (line 26) | public ArrayList getNodes() { FILE: Java/Ch 04. Trees and Graphs/Q4_07_Build_Order/EdgeRemoval/Project.java class Project (line 6) | public class Project { method Project (line 12) | public Project(String n) { method getName (line 16) | public String getName() { method addNeighbor (line 20) | public void addNeighbor(Project node) { method incrementDependencies (line 28) | public void incrementDependencies() { method getChildren (line 32) | public ArrayList getChildren() { method decrementDependencies (line 36) | public void decrementDependencies() { method getNumberDependencies (line 40) | public int getNumberDependencies() { FILE: Java/Ch 04. Trees and Graphs/Q4_07_Build_Order/EdgeRemoval/Question.java class Question (line 5) | public class Question { method buildGraph (line 11) | public static Graph buildGraph(String[] projects, String[][] dependenc... method addNonDependent (line 28) | public static int addNonDependent(Project[] order, ArrayList ... method orderProjects (line 38) | public static Project[] orderProjects(ArrayList projects) { method convertToStringList (line 69) | public static String[] convertToStringList(Project[] projects) { method findBuildOrder (line 77) | public static Project[] findBuildOrder(String[] projects, String[][] d... method buildOrderWrapper (line 83) | public static String[] buildOrderWrapper(String[] projects, String[][]... method main (line 90) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_08_First_Common_Ancestor/Question.java class Question (line 5) | public class Question { method covers (line 11) | public static int covers(TreeNode root, TreeNode p, TreeNode q) { method commonAncestor (line 21) | public static TreeNode commonAncestor(TreeNode root, TreeNode p, TreeN... method main (line 45) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_08_First_Common_Ancestor/QuestionA.java class QuestionA (line 5) | public class QuestionA { method commonAncestor (line 6) | public static TreeNode commonAncestor(TreeNode p, TreeNode q) { method isOnPath (line 19) | public static boolean isOnPath(TreeNode ancestor, TreeNode node) { method main (line 26) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_08_First_Common_Ancestor/QuestionB.java class QuestionB (line 5) | public class QuestionB { method commonAncestor (line 6) | public static TreeNode commonAncestor(TreeNode p, TreeNode q) { method goUpBy (line 18) | public static TreeNode goUpBy(TreeNode node, int delta) { method depth (line 26) | public static int depth(TreeNode node) { method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_08_First_Common_Ancestor/QuestionC.java class QuestionC (line 5) | public class QuestionC { method commonAncestor (line 7) | public static TreeNode commonAncestor(TreeNode root, TreeNode p, TreeN... method covers (line 25) | public static boolean covers(TreeNode root, TreeNode p) { method getSibling (line 31) | public static TreeNode getSibling(TreeNode node) { method main (line 40) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_08_First_Common_Ancestor/QuestionD.java class QuestionD (line 5) | public class QuestionD { method commonAncestor (line 7) | public static TreeNode commonAncestor(TreeNode root, TreeNode p, TreeN... method ancestorHelper (line 14) | public static TreeNode ancestorHelper(TreeNode root, TreeNode p, TreeN... method covers (line 28) | public static boolean covers(TreeNode root, TreeNode p) { method main (line 36) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_08_First_Common_Ancestor/QuestionE.java class QuestionE (line 5) | public class QuestionE { class Result (line 6) | public static class Result { method Result (line 9) | public Result(TreeNode n, boolean isAnc) { method commonAncestorHelper (line 15) | public static Result commonAncestorHelper(TreeNode root, TreeNode p, T... method commonAncestor (line 46) | public static TreeNode commonAncestor(TreeNode root, TreeNode p, TreeN... method main (line 54) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_08_First_Common_Ancestor/QuestionEBad.java class QuestionEBad (line 5) | public class QuestionEBad { method commonAncestorBad (line 6) | public static TreeNode commonAncestorBad(TreeNode root, TreeNode p, Tr... method main (line 33) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_08_First_Common_Ancestor/QuestionF.java class QuestionF (line 5) | public class QuestionF { method commonAncestor (line 7) | public static TreeNode commonAncestor(TreeNode root, TreeNode p, TreeN... method main (line 26) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_08_First_Common_Ancestor/Tester.java class Tester (line 7) | public class Tester { method resultToString (line 8) | public static String resultToString(String s, TreeNode x, TreeNode y, ... method main (line 18) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_09_BST_Sequences/Question.java class Question (line 8) | public class Question { method weaveLists (line 10) | public static void weaveLists(LinkedList first, LinkedList> allSequences(TreeNode nod... method main (line 65) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_10_Check_Subtree/QuestionA.java class QuestionA (line 6) | public class QuestionA { method containsTree (line 8) | public static boolean containsTree(TreeNode t1, TreeNode t2) { method getOrderString (line 18) | public static void getOrderString(TreeNode node, StringBuilder sb) { method main (line 28) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_10_Check_Subtree/QuestionB.java class QuestionB (line 6) | public class QuestionB { method containsTree (line 8) | public static boolean containsTree(TreeNode t1, TreeNode t2) { method subTree (line 18) | public static boolean subTree(TreeNode r1, TreeNode r2) { method matchTree (line 30) | public static boolean matchTree(TreeNode r1, TreeNode r2) { method main (line 42) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_11_Random_Node/Question.java class Question (line 3) | public class Question { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_11_Random_Node/Tree.java class Tree (line 5) | public class Tree { method insertInOrder (line 8) | public void insertInOrder(int value) { method size (line 16) | public int size() { method getRandomNode (line 20) | public TreeNode getRandomNode() { FILE: Java/Ch 04. Trees and Graphs/Q4_11_Random_Node/TreeNode.java class TreeNode (line 8) | public class TreeNode { method TreeNode (line 14) | public TreeNode(int d) { method insertInOrder (line 19) | public void insertInOrder(int d) { method size (line 36) | public int size() { method find (line 40) | public TreeNode find(int d) { method getRandomNode (line 51) | public TreeNode getRandomNode() { method getIthNode (line 64) | public TreeNode getIthNode(int i) { FILE: Java/Ch 04. Trees and Graphs/Q4_12_Paths_with_Sum/QuestionA.java class QuestionA (line 5) | public class QuestionA { method countPathsWithSum (line 7) | public static int countPathsWithSum(TreeNode root, int targetSum) { method countPathsWithSumFromNode (line 21) | public static int countPathsWithSumFromNode(TreeNode node, int targetS... method main (line 37) | public static void main(String [] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_12_Paths_with_Sum/QuestionB.java class QuestionB (line 6) | public class QuestionB { method countPathsWithSum (line 8) | public static int countPathsWithSum(TreeNode root, int targetSum) { method countPathsWithSum (line 12) | public static int countPathsWithSum(TreeNode node, int targetSum, int ... method incrementHashTable (line 37) | public static void incrementHashTable(HashMap hashTa... method main (line 46) | public static void main(String [] args) { FILE: Java/Ch 04. Trees and Graphs/Q4_12_Paths_with_Sum/Tester.java class Tester (line 6) | public class Tester { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_01_Insertion/Question.java class Question (line 5) | public class Question { method updateBits (line 7) | public static int updateBits(int n, int m, int i, int j) { method main (line 31) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_02_Binary_to_String/Question.java class Question (line 3) | public class Question { method printBinary (line 4) | public static String printBinary(double num) { method printBinary2 (line 28) | public static String printBinary2(double num) { method main (line 52) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_03_Flip_Bit_to_Win/QuestionA.java class QuestionA (line 3) | public class QuestionA { method getBit (line 7) | public static boolean getBit(int num, int i) { method longestSequence (line 11) | public static int longestSequence(int n) { method longestSequenceOf1s (line 21) | public static int longestSequenceOf1s(int n, int indexToIgnore) { method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_03_Flip_Bit_to_Win/QuestionB.java class QuestionB (line 5) | public class QuestionB { method longestSequence (line 7) | public static int longestSequence(int n) { method getAlternatingSequences (line 16) | public static ArrayList getAlternatingSequences(int n) { method findLongestSequence (line 36) | public static int findLongestSequence(ArrayList seq) { method main (line 58) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_03_Flip_Bit_to_Win/QuestionC.java class QuestionC (line 3) | public class QuestionC { method getMaxSequence (line 9) | public static int getMaxSequence(int[] sequences) { /* 1s, then 0s, th... method shift (line 19) | public static void shift(int[] sequences) { method longestSequence (line 25) | public static int longestSequence(int n) { method main (line 53) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_03_Flip_Bit_to_Win/QuestionD.java class QuestionD (line 3) | public class QuestionD { method flipBit (line 5) | public static int flipBit(int a) { method main (line 26) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_03_Flip_Bit_to_Win/Tester.java class Tester (line 3) | public class Tester { method checkRange (line 5) | public static boolean checkRange(int start, int range) { method main (line 27) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_04_Next_Number/QuestionA.java class QuestionA (line 3) | public class QuestionA { method countOnes (line 5) | public static int countOnes(int i) { method countZeros (line 16) | public static int countZeros(int i) { method hasValidNext (line 20) | public static boolean hasValidNext(int i) { method hasValidPrev (line 39) | public static boolean hasValidPrev(int i) { method getNextSlow (line 49) | public static int getNextSlow(int i) { method getPrevSlow (line 61) | public static int getPrevSlow(int i) { method main (line 73) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_04_Next_Number/QuestionB.java class QuestionB (line 3) | public class QuestionB { method getNext (line 5) | public static int getNext(int n) { method getPrev (line 50) | public static int getPrev(int n) { method binPrint (line 105) | public static void binPrint(int i) { method main (line 109) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_04_Next_Number/QuestionC.java class QuestionC (line 3) | public class QuestionC { method getNextArith (line 4) | public static int getNextArith(int n) { method getPrevArith (line 34) | public static int getPrevArith(int n) { method binPrint (line 62) | public static void binPrint(int i) { method main (line 66) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_04_Next_Number/Tester.java class Tester (line 3) | public class Tester { method binPrint (line 4) | public static void binPrint(int i) { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_06_Conversion/QuestionA.java class QuestionA (line 5) | public class QuestionA { method bitSwapRequired (line 6) | public static int bitSwapRequired(int a, int b) { method main (line 16) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_06_Conversion/QuestionB.java class QuestionB (line 5) | public class QuestionB { method bitSwapRequired (line 6) | public static int bitSwapRequired(int a, int b){ method main (line 22) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_06_Conversion/Tester.java class Tester (line 5) | public class Tester { method bitSwapRequired (line 6) | public static int bitSwapRequired(int a, int b) { method bitSwapRequired2 (line 14) | public static int bitSwapRequired2(int a, int b){ method main (line 22) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_07_Pairwise_Swap/Question.java class Question (line 5) | public class Question { method swapOddEvenBits (line 7) | public static int swapOddEvenBits(int x) { method main (line 11) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Q5_08_Draw_Line/Question.java class Question (line 3) | public class Question { method computeByteNum (line 4) | public static int computeByteNum(int width, int x, int y) { method drawLine (line 8) | public static void drawLine(byte[] screen, int width, int x1, int x2, ... method printByte (line 45) | public static void printByte(byte b) { method printScreen (line 52) | public static void printScreen(byte[] screen, int width) { method main (line 63) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Sample_Code/RightShifts.java class RightShifts (line 5) | public class RightShifts { method repeatedArithmeticShift (line 6) | public static int repeatedArithmeticShift(int x, int count) { method repeatedLogicalShift (line 13) | public static int repeatedLogicalShift(int x, int count) { method main (line 20) | public static void main(String[] args) { FILE: Java/Ch 05. Bit Manipulation/Sample_Code/Sample_Code.java class Sample_Code (line 5) | public class Sample_Code { method getBit (line 7) | public static boolean getBit(int num, int i) { method setBit (line 11) | public static int setBit(int num, int i) { method clearBit (line 15) | public static int clearBit(int num, int i) { method updateBit (line 20) | public static int updateBit(int num, int i, boolean bitIs1) { method clearBitsMSBthroughI (line 26) | public static int clearBitsMSBthroughI(int num, int i) { method clearBitsIthrough0 (line 31) | public static int clearBitsIthrough0(int num, int i) { method main (line 36) | public static void main(String[] args) { FILE: Java/Ch 06. Math and Logic Puzzles/Introduction/PrimeNumbers.java class PrimeNumbers (line 3) | public class PrimeNumbers { method primeNaive (line 5) | public static boolean primeNaive(int n) { method primeSlightlyBetter (line 14) | public static boolean primeSlightlyBetter(int n) { method main (line 24) | public static void main(String[] args) { FILE: Java/Ch 06. Math and Logic Puzzles/Introduction/SieveOfEratosthenes.java class SieveOfEratosthenes (line 3) | public class SieveOfEratosthenes { method crossOff (line 5) | public static void crossOff(boolean[] flags, int prime) { method getNextPrime (line 15) | public static int getNextPrime(boolean[] flags, int prime) { method init (line 23) | public static void init(boolean[] flags) { method prune (line 31) | public static int[] prune(boolean[] flags, int count) { method sieveOfEratosthenes (line 43) | public static boolean[] sieveOfEratosthenes(int max) { method main (line 60) | public static void main(String[] args) { FILE: Java/Ch 06. Math and Logic Puzzles/Q6_05_Egg_Drop/Question.java class Question (line 3) | public class Question { method willBreak (line 8) | public static boolean willBreak(int floor) { method findBreakingPoint (line 14) | public static int findBreakingPoint(int floors) { method main (line 37) | public static void main(String[] args) { FILE: Java/Ch 06. Math and Logic Puzzles/Q6_07_The_Apocalypse/Question.java class Question (line 5) | public class Question { method runOneFamily (line 6) | public static int[] runOneFamily() { method runNFamilies (line 21) | public static double runNFamilies(int n) { method main (line 32) | public static void main(String[] args) { FILE: Java/Ch 06. Math and Logic Puzzles/Q6_10_Test_Strips/Bottle.java class Bottle (line 3) | public class Bottle { method Bottle (line 7) | public Bottle(int id) { method getId (line 11) | public int getId() { method setAsPoisoned (line 15) | public void setAsPoisoned() { method isPoisoned (line 19) | public boolean isPoisoned() { FILE: Java/Ch 06. Math and Logic Puzzles/Q6_10_Test_Strips/QuestionA.java class QuestionA (line 6) | public class QuestionA { method findPoisonedBottle (line 7) | public static int findPoisonedBottle(ArrayList bottles, ArrayL... method runTestSet (line 34) | public static void runTestSet(ArrayList bottles, ArrayList createBottles(int nBottles, int poison... method createTestStrips (line 60) | public static ArrayList createTestStrips(int nTestStrips) { method main (line 68) | public static void main(String[] args) { FILE: Java/Ch 06. Math and Logic Puzzles/Q6_10_Test_Strips/QuestionB.java class QuestionB (line 7) | public class QuestionB { method createBottles (line 8) | public static ArrayList createBottles(int nBottles, int poison... method findPoisonedBottle (line 25) | public static int findPoisonedBottle(ArrayList bottles, ArrayL... method runTestSet (line 67) | public static void runTestSet(ArrayList bottles, ArrayList testStrips, in... method createTestStrips (line 100) | public static ArrayList createTestStrips(int nTestStrips) { method main (line 108) | public static void main(String[] args) { FILE: Java/Ch 06. Math and Logic Puzzles/Q6_10_Test_Strips/QuestionC.java class QuestionC (line 6) | public class QuestionC { method createBottles (line 7) | public static ArrayList createBottles(int nBottles, int poison... method findPoisonedBottle (line 24) | public static int findPoisonedBottle(ArrayList bottles, ArrayL... method runTests (line 31) | public static void runTests(ArrayList bottles, ArrayList getPositiveOnDay(ArrayList... method setBits (line 58) | public static int setBits(ArrayList positive) { method createTestStrips (line 66) | public static ArrayList createTestStrips(int nTestStrips) { method main (line 74) | public static void main(String[] args) { FILE: Java/Ch 06. Math and Logic Puzzles/Q6_10_Test_Strips/TestStrip.java class TestStrip (line 5) | public class TestStrip { method TestStrip (line 10) | public TestStrip(int id) { method getId (line 14) | public int getId() { method sizeDropsForDay (line 19) | private void sizeDropsForDay(int day) { method addDropOnDay (line 26) | public void addDropOnDay(int day, Bottle bottle) { method hasPoison (line 33) | private boolean hasPoison(ArrayList bottles) { method getLastWeeksBottles (line 43) | public ArrayList getLastWeeksBottles(int day) { method isPositiveOnDay (line 51) | public boolean isPositiveOnDay(int day) { FILE: Java/Ch 07. Object-Oriented Design/Q7_01_Deck_of_Cards/BlackJackCard.java class BlackJackCard (line 3) | public class BlackJackCard extends Card { method BlackJackCard (line 4) | public BlackJackCard(int c, Suit s) { method value (line 8) | public int value() { method minValue (line 18) | public int minValue() { method maxValue (line 26) | public int maxValue() { method isAce (line 34) | public boolean isAce() { method isFaceCard (line 38) | public boolean isFaceCard() { FILE: Java/Ch 07. Object-Oriented Design/Q7_01_Deck_of_Cards/BlackJackGameAutomator.java class BlackJackGameAutomator (line 5) | public class BlackJackGameAutomator { method BlackJackGameAutomator (line 10) | public BlackJackGameAutomator(int numPlayers) { method dealInitial (line 17) | public boolean dealInitial() { method getBlackJacks (line 30) | public ArrayList getBlackJacks() { method playHand (line 40) | public boolean playHand(int i) { method playHand (line 45) | public boolean playHand(BlackJackHand hand) { method playAllHands (line 56) | public boolean playAllHands() { method getWinners (line 65) | public ArrayList getWinners() { method initializeDeck (line 83) | public void initializeDeck() { method printHandsAndScore (line 98) | public void printHandsAndScore() { FILE: Java/Ch 07. Object-Oriented Design/Q7_01_Deck_of_Cards/BlackJackHand.java class BlackJackHand (line 5) | public class BlackJackHand extends Hand { method BlackJackHand (line 6) | public BlackJackHand() { method score (line 10) | public int score() { method possibleScores (line 24) | private ArrayList possibleScores() { method addCardToScoreList (line 35) | private void addCardToScoreList(BlackJackCard card, ArrayList... method busted (line 49) | public boolean busted() { method is21 (line 53) | public boolean is21() { method isBlackJack (line 57) | public boolean isBlackJack() { FILE: Java/Ch 07. Object-Oriented Design/Q7_01_Deck_of_Cards/Card.java class Card (line 3) | public abstract class Card { method Card (line 12) | public Card(int c, Suit s) { method value (line 17) | public abstract int value(); method suit (line 19) | public Suit suit() { method isAvailable (line 24) | public boolean isAvailable() { method markUnavailable (line 28) | public void markUnavailable() { method markAvailable (line 32) | public void markAvailable() { method print (line 36) | public void print() { FILE: Java/Ch 07. Object-Oriented Design/Q7_01_Deck_of_Cards/Deck.java class Deck (line 7) | public class Deck { method Deck (line 11) | public Deck() { method setDeckOfCards (line 14) | public void setDeckOfCards(ArrayList deckOfCards) { method shuffle (line 18) | public void shuffle() { method remainingCards (line 28) | public int remainingCards() { method dealHand (line 32) | public T[] dealHand(int number) { method dealCard (line 50) | public T dealCard() { method print (line 62) | public void print() { FILE: Java/Ch 07. Object-Oriented Design/Q7_01_Deck_of_Cards/Hand.java class Hand (line 5) | public class Hand { method score (line 8) | public int score() { method addCard (line 16) | public void addCard(T card) { method print (line 20) | public void print() { FILE: Java/Ch 07. Object-Oriented Design/Q7_01_Deck_of_Cards/Question.java class Question (line 5) | public class Question { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 07. Object-Oriented Design/Q7_01_Deck_of_Cards/Suit.java type Suit (line 3) | public enum Suit { method Suit (line 10) | private Suit(int v) { method getValue (line 14) | public int getValue() { method getSuitFromValue (line 18) | public static Suit getSuitFromValue(int value) { FILE: Java/Ch 07. Object-Oriented Design/Q7_02_Call_Center/Call.java class Call (line 6) | public class Call { method Call (line 16) | public Call(Caller c) { method setHandler (line 22) | public void setHandler(Employee e) { method reply (line 27) | public void reply(String message) { method getRank (line 31) | public Rank getRank() { method setRank (line 35) | public void setRank(Rank r) { method incrementRank (line 39) | public Rank incrementRank() { method disconnect (line 49) | public void disconnect() { FILE: Java/Ch 07. Object-Oriented Design/Q7_02_Call_Center/CallHandler.java class CallHandler (line 9) | public class CallHandler { method CallHandler (line 28) | public CallHandler() { method getHandlerForCall (line 51) | public Employee getHandlerForCall(Call call) { method dispatchCall (line 64) | public void dispatchCall(Caller caller) { method dispatchCall (line 70) | public void dispatchCall(Call call) { method assignCall (line 85) | public boolean assignCall(Employee emp) { FILE: Java/Ch 07. Object-Oriented Design/Q7_02_Call_Center/Caller.java class Caller (line 3) | public class Caller { method Caller (line 6) | public Caller(int id, String nm) { FILE: Java/Ch 07. Object-Oriented Design/Q7_02_Call_Center/Director.java class Director (line 3) | class Director extends Employee { method Director (line 4) | public Director(CallHandler callHandler) { FILE: Java/Ch 07. Object-Oriented Design/Q7_02_Call_Center/Employee.java class Employee (line 6) | abstract class Employee { method Employee (line 11) | public Employee(CallHandler handler) { method receiveCall (line 16) | public void receiveCall(Call call) { method callCompleted (line 21) | public void callCompleted() { method escalateAndReassign (line 38) | public void escalateAndReassign() { method assignNewCall (line 53) | public boolean assignNewCall() { method isFree (line 61) | public boolean isFree() { method getRank (line 65) | public Rank getRank() { FILE: Java/Ch 07. Object-Oriented Design/Q7_02_Call_Center/Manager.java class Manager (line 3) | class Manager extends Employee { method Manager (line 4) | public Manager(CallHandler callHandler) { FILE: Java/Ch 07. Object-Oriented Design/Q7_02_Call_Center/Rank.java type Rank (line 3) | public enum Rank { method Rank (line 10) | private Rank(int v) { method getValue (line 14) | public int getValue() { FILE: Java/Ch 07. Object-Oriented Design/Q7_02_Call_Center/Respondent.java class Respondent (line 3) | class Respondent extends Employee { method Respondent (line 4) | public Respondent(CallHandler callHandler) { FILE: Java/Ch 07. Object-Oriented Design/Q7_02_Call_Center/Test.java class Test (line 3) | public class Test { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 07. Object-Oriented Design/Q7_03_Jukebox/CD.java class CD (line 3) | public class CD { FILE: Java/Ch 07. Object-Oriented Design/Q7_03_Jukebox/CDPlayer.java class CDPlayer (line 3) | public class CDPlayer { method getPlaylist (line 7) | public Playlist getPlaylist() { return p; } method setPlaylist (line 8) | public void setPlaylist(Playlist p) { this.p = p; } method getCD (line 9) | public CD getCD() { return c; } method setCD (line 10) | public void setCD(CD c) { this.c = c; } method CDPlayer (line 12) | public CDPlayer(Playlist p) { this.p = p; } method CDPlayer (line 13) | public CDPlayer(CD c, Playlist p) { method CDPlayer (line 18) | public CDPlayer(CD c){ this.c = c; } method playSong (line 19) | public void playSong(Song s) { } FILE: Java/Ch 07. Object-Oriented Design/Q7_03_Jukebox/JukeBox.java class JukeBox (line 5) | public class JukeBox { method JukeBox (line 11) | public JukeBox(CDPlayer cdPlayer, User user, Set cdCollection, method getCurrentSong (line 20) | public Song getCurrentSong() { return ts.getCurrentSong(); } method setUser (line 21) | public void setUser(User u) { this.user = u; } FILE: Java/Ch 07. Object-Oriented Design/Q7_03_Jukebox/Playlist.java class Playlist (line 5) | public class Playlist { method Playlist (line 8) | public Playlist(Song song, Queue queue) { method getNextSongToPlay (line 14) | public Song getNextSongToPlay(){ return queue.peek(); } method queueUpSong (line 15) | public void queueUpSong(Song s){ queue.add(s); } FILE: Java/Ch 07. Object-Oriented Design/Q7_03_Jukebox/Song.java class Song (line 3) | public class Song { method toString (line 5) | public String toString() { return songName; } FILE: Java/Ch 07. Object-Oriented Design/Q7_03_Jukebox/SongSelector.java class SongSelector (line 4) | public class SongSelector { method SongSelector (line 6) | public SongSelector(Song s) { currentSong=s; } method setSong (line 7) | public void setSong(Song s) { currentSong = s; } method getCurrentSong (line 8) | public Song getCurrentSong() { return currentSong; } FILE: Java/Ch 07. Object-Oriented Design/Q7_03_Jukebox/User.java class User (line 3) | public class User { method getName (line 5) | public String getName() { return name; } method setName (line 6) | public void setName(String name) { this.name = name; } method getID (line 7) | public long getID() { return ID; } method setID (line 8) | public void setID(long iD) { ID = iD; } method User (line 10) | public User(String name, long iD) { method getUser (line 14) | public User getUser() { return this; } method addUser (line 15) | public static User addUser(String name, long iD){ FILE: Java/Ch 07. Object-Oriented Design/Q7_04_Parking_Lot/Bus.java class Bus (line 3) | public class Bus extends Vehicle { method Bus (line 4) | public Bus() { method canFitInSpot (line 9) | public boolean canFitInSpot(ParkingSpot spot) { method print (line 13) | public void print() { FILE: Java/Ch 07. Object-Oriented Design/Q7_04_Parking_Lot/Car.java class Car (line 3) | public class Car extends Vehicle { method Car (line 4) | public Car() { method canFitInSpot (line 9) | public boolean canFitInSpot(ParkingSpot spot) { method print (line 13) | public void print() { FILE: Java/Ch 07. Object-Oriented Design/Q7_04_Parking_Lot/Level.java class Level (line 4) | public class Level { method Level (line 10) | public Level(int flr, int numberSpots) { method availableSpots (line 29) | public int availableSpots() { method parkVehicle (line 34) | public boolean parkVehicle(Vehicle vehicle) { method parkStartingAtSpot (line 46) | private boolean parkStartingAtSpot(int spotNumber, Vehicle vehicle) { method findAvailableSpots (line 57) | private int findAvailableSpots(Vehicle vehicle) { method print (line 79) | public void print() { method spotFreed (line 92) | public void spotFreed() { FILE: Java/Ch 07. Object-Oriented Design/Q7_04_Parking_Lot/Motorcycle.java class Motorcycle (line 3) | public class Motorcycle extends Vehicle { method Motorcycle (line 4) | public Motorcycle() { method canFitInSpot (line 9) | public boolean canFitInSpot(ParkingSpot spot) { method print (line 13) | public void print() { FILE: Java/Ch 07. Object-Oriented Design/Q7_04_Parking_Lot/ParkingLot.java class ParkingLot (line 3) | public class ParkingLot { method ParkingLot (line 7) | public ParkingLot() { method parkVehicle (line 15) | public boolean parkVehicle(Vehicle vehicle) { method print (line 24) | public void print() { FILE: Java/Ch 07. Object-Oriented Design/Q7_04_Parking_Lot/ParkingSpot.java class ParkingSpot (line 3) | public class ParkingSpot { method ParkingSpot (line 10) | public ParkingSpot(Level lvl, int r, int n, VehicleSize sz) { method isAvailable (line 17) | public boolean isAvailable() { method canFitVehicle (line 23) | public boolean canFitVehicle(Vehicle vehicle) { method park (line 28) | public boolean park(Vehicle v) { method getRow (line 37) | public int getRow() { method getSpotNumber (line 41) | public int getSpotNumber() { method getSize (line 45) | public VehicleSize getSize() { method removeVehicle (line 50) | public void removeVehicle() { method print (line 55) | public void print() { FILE: Java/Ch 07. Object-Oriented Design/Q7_04_Parking_Lot/Question.java class Question (line 5) | public class Question { method main (line 10) | public static void main(String[] args) { FILE: Java/Ch 07. Object-Oriented Design/Q7_04_Parking_Lot/Vehicle.java class Vehicle (line 5) | public abstract class Vehicle { method getSpotsNeeded (line 11) | public int getSpotsNeeded() { method getSize (line 15) | public VehicleSize getSize() { method parkInSpot (line 20) | public void parkInSpot(ParkingSpot spot) { method clearSpots (line 25) | public void clearSpots() { method canFitInSpot (line 32) | public abstract boolean canFitInSpot(ParkingSpot spot); method print (line 33) | public abstract void print(); FILE: Java/Ch 07. Object-Oriented Design/Q7_04_Parking_Lot/VehicleSize.java type VehicleSize (line 3) | public enum VehicleSize { FILE: Java/Ch 07. Object-Oriented Design/Q7_05_Online_Book_Reader/Book.java class Book (line 3) | public class Book { method Book (line 7) | public Book(int id, String det) { method update (line 12) | public void update() { } method getID (line 14) | public int getID() { method setID (line 18) | public void setID(int id) { method getDetails (line 22) | public String getDetails() { method setDetails (line 26) | public void setDetails(String details) { FILE: Java/Ch 07. Object-Oriented Design/Q7_05_Online_Book_Reader/Display.java class Display (line 3) | public class Display { method displayUser (line 8) | public void displayUser(User user) { method displayBook (line 13) | public void displayBook(Book book) { method refreshUsername (line 22) | public void refreshUsername() { method refreshTitle (line 26) | public void refreshTitle() { method refreshDetails (line 30) | public void refreshDetails() { method refreshPage (line 34) | public void refreshPage() { method turnPageForward (line 38) | public void turnPageForward() { method turnPageBackward (line 43) | public void turnPageBackward() { FILE: Java/Ch 07. Object-Oriented Design/Q7_05_Online_Book_Reader/Library.java class Library (line 5) | public class Library { method addBook (line 9) | public Book addBook(int id, String details) { method remove (line 18) | public boolean remove(Book b){ method remove (line 22) | public boolean remove(int id) { method find (line 30) | public Book find(int id){ FILE: Java/Ch 07. Object-Oriented Design/Q7_05_Online_Book_Reader/OnlineReaderSystem.java class OnlineReaderSystem (line 3) | public class OnlineReaderSystem { method OnlineReaderSystem (line 11) | public OnlineReaderSystem() { method getLibrary (line 17) | public Library getLibrary() { method getUserManager (line 21) | public UserManager getUserManager() { method getDisplay (line 25) | public Display getDisplay() { method getActiveBook (line 29) | public Book getActiveBook() { method setActiveBook (line 33) | public void setActiveBook(Book book) { method getActiveUser (line 38) | public User getActiveUser() { method setActiveUser (line 42) | public void setActiveUser(User user) { FILE: Java/Ch 07. Object-Oriented Design/Q7_05_Online_Book_Reader/User.java class User (line 3) | public class User { method renewMembership (line 8) | public void renewMembership() { } method User (line 10) | public User(int id, String details, int accountType) { method getID (line 17) | public int getID() { return userId; } method setID (line 18) | public void setID(int id) { userId = id; } method getDetails (line 19) | public String getDetails() { return details; } method setDetails (line 20) | public void setDetails(String details) { this.details = details; } method getAccountType (line 21) | public int getAccountType() { return accountType; } method setAccountType (line 22) | public void setAccountType(int accountType) { FILE: Java/Ch 07. Object-Oriented Design/Q7_05_Online_Book_Reader/UserManager.java class UserManager (line 5) | public class UserManager { method addUser (line 8) | public User addUser(int id, String details, int accountType) { method remove (line 17) | public boolean remove(User u) { method remove (line 21) | public boolean remove(int id) { method find (line 29) | public User find(int id){ FILE: Java/Ch 07. Object-Oriented Design/Q7_06_Jigsaw/Edge.java class Edge (line 3) | public class Edge { method Edge (line 8) | public Edge(Shape shape, String code) { method getCode (line 13) | private String getCode() { method _createMatchingEdge (line 17) | public Edge _createMatchingEdge() { method fitsWith (line 23) | public boolean fitsWith(Edge edge) { method setParentPiece (line 28) | public void setParentPiece(Piece parentPiece) { method getParentPiece (line 33) | public Piece getParentPiece() { method getShape (line 38) | public Shape getShape() { method toString (line 42) | public String toString() { FILE: Java/Ch 07. Object-Oriented Design/Q7_06_Jigsaw/Orientation.java type Orientation (line 3) | public enum Orientation { method getOpposite (line 6) | public Orientation getOpposite() { FILE: Java/Ch 07. Object-Oriented Design/Q7_06_Jigsaw/Piece.java class Piece (line 6) | public class Piece { method Piece (line 10) | public Piece(Edge[] edgeList) { method setEdgeAsOrientation (line 20) | public void setEdgeAsOrientation(Edge edge, Orientation orientation) { method getOrientation (line 26) | private Orientation getOrientation(Edge edge) { method rotateEdgesBy (line 36) | public void rotateEdgesBy(int numberRotations) { method isCorner (line 52) | public boolean isCorner() { method isBorder (line 65) | public boolean isBorder() { method getEdgeWithOrientation (line 76) | public Edge getEdgeWithOrientation(Orientation orientation) { method getMatchingEdge (line 81) | public Edge getMatchingEdge(Edge targetEdge) { method toString (line 90) | public String toString() { FILE: Java/Ch 07. Object-Oriented Design/Q7_06_Jigsaw/Puzzle.java class Puzzle (line 5) | public class Puzzle { method Puzzle (line 10) | public Puzzle(int size, LinkedList pieces) { method groupPieces (line 16) | public void groupPieces(LinkedList cornerPieces, LinkedList pieces) { method setEdgeInSolution (line 60) | private void setEdgeInSolution(LinkedList pieces, Edge edge, in... method getPieceListToSearch (line 68) | private LinkedList getPieceListToSearch(LinkedList corne... method fitNextEdge (line 79) | private boolean fitNextEdge(LinkedList piecesToSearch, int row,... method solve (line 100) | public boolean solve() { method getCurrentSolution (line 121) | public Piece[][] getCurrentSolution() { FILE: Java/Ch 07. Object-Oriented Design/Q7_06_Jigsaw/Question.java class Question (line 6) | public class Question { method createRandomEdge (line 9) | public static Edge createRandomEdge(String code) { method createEdges (line 18) | public static Edge[] createEdges(Piece[][] puzzle, int column, int row) { method initializePuzzle (line 36) | public static LinkedList initializePuzzle(int size) { method solutionToString (line 62) | public static String solutionToString(Piece[][] solution) { method validate (line 80) | public static boolean validate(Piece[][] solution) { method testSize (line 115) | public static boolean testSize(int size) { method main (line 127) | public static void main(String[] args) { FILE: Java/Ch 07. Object-Oriented Design/Q7_06_Jigsaw/Shape.java type Shape (line 3) | public enum Shape { method getOpposite (line 6) | public Shape getOpposite() { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/AddRequest.java class AddRequest (line 5) | public class AddRequest { method AddRequest (line 11) | public AddRequest(User from, User to, Date date) { method getStatus (line 18) | public RequestStatus getStatus() { method getFromUser (line 22) | public User getFromUser() { method getToUser (line 26) | public User getToUser() { method getDate (line 30) | public Date getDate() { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/Conversation.java class Conversation (line 5) | public abstract class Conversation { method getMessages (line 10) | public ArrayList getMessages() { method addMessage (line 14) | public boolean addMessage(Message m) { method getId (line 19) | public int getId() { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/GroupChat.java class GroupChat (line 3) | public class GroupChat extends Conversation { method removeParticipant (line 4) | public void removeParticipant(User user) { method addParticipant (line 8) | public void addParticipant(User user) { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/Message.java class Message (line 5) | public class Message { method Message (line 8) | public Message(String content, Date date) { method getContent (line 13) | public String getContent() { method getDate (line 17) | public Date getDate() { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/PrivateChat.java class PrivateChat (line 3) | public class PrivateChat extends Conversation { method PrivateChat (line 4) | public PrivateChat(User user1, User user2) { method getOtherParticipant (line 9) | public User getOtherParticipant(User primary) { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/RequestStatus.java type RequestStatus (line 3) | public enum RequestStatus { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/System.java class System (line 3) | public class System { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/User.java class User (line 7) | public class User { method User (line 19) | public User(int id, String accountName, String fullName) { method sendMessageToUser (line 25) | public boolean sendMessageToUser(User toUser, String content) { method sendMessageToGroupChat (line 35) | public boolean sendMessageToGroupChat(int groupId, String content) { method setStatus (line 44) | public void setStatus(UserStatus status) { method getStatus (line 48) | public UserStatus getStatus() { method addContact (line 52) | public boolean addContact(User user) { method receivedAddRequest (line 61) | public void receivedAddRequest(AddRequest req) { method sentAddRequest (line 68) | public void sentAddRequest(AddRequest req) { method removeAddRequest (line 75) | public void removeAddRequest(AddRequest req) { method requestAddUser (line 83) | public void requestAddUser(String accountName) { method addConversation (line 87) | public void addConversation(PrivateChat conversation) { method addConversation (line 92) | public void addConversation(GroupChat conversation) { method getId (line 96) | public int getId() { method getAccountName (line 100) | public String getAccountName() { method getFullName (line 104) | public String getFullName() { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/UserManager.java class UserManager (line 7) | public class UserManager { method getInstance (line 13) | public static UserManager getInstance() { method addUser (line 20) | public void addUser(User fromUser, String toAccountName) { method approveAddRequest (line 27) | public void approveAddRequest(AddRequest req) { method rejectAddRequest (line 35) | public void rejectAddRequest(AddRequest req) { method userSignedOn (line 43) | public void userSignedOn(String accountName) { method userSignedOff (line 51) | public void userSignedOff(String accountName) { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/UserStatus.java class UserStatus (line 3) | public class UserStatus { method UserStatus (line 6) | public UserStatus(UserStatusType type, String message) { method getStatusType (line 11) | public UserStatusType getStatusType() { method getMessage (line 15) | public String getMessage() { FILE: Java/Ch 07. Object-Oriented Design/Q7_07_Chat_Server/UserStatusType.java type UserStatusType (line 3) | public enum UserStatusType { FILE: Java/Ch 07. Object-Oriented Design/Q7_08_Othello/Automator.java class Automator (line 8) | public class Automator { method Automator (line 14) | private Automator() { method getInstance (line 23) | public static Automator getInstance() { method initialize (line 30) | public void initialize(Player[] ps) { method shuffle (line 35) | public void shuffle() { method removeLocation (line 45) | public void removeLocation(int r, int c) { method getLocation (line 54) | public Location getLocation(int index) { method playRandom (line 58) | public boolean playRandom() { method isOver (line 78) | public boolean isOver() { method printScores (line 85) | public void printScores() { FILE: Java/Ch 07. Object-Oriented Design/Q7_08_Othello/Board.java class Board (line 3) | public class Board { method Board (line 8) | public Board(int rows, int columns) { method initialize (line 12) | public void initialize() { method placeColor (line 27) | public boolean placeColor(int row, int column, Color color) { method flipSection (line 58) | private int flipSection(int row, int column, Color color, Direction d) { method getScoreForColor (line 103) | public int getScoreForColor(Color c) { method updateScore (line 111) | public void updateScore(Color newColor, int newPieces) { method printBoard (line 124) | public void printBoard() { FILE: Java/Ch 07. Object-Oriented Design/Q7_08_Othello/Color.java type Color (line 3) | public enum Color { FILE: Java/Ch 07. Object-Oriented Design/Q7_08_Othello/Direction.java type Direction (line 3) | public enum Direction { FILE: Java/Ch 07. Object-Oriented Design/Q7_08_Othello/Game.java class Game (line 3) | public class Game { method Game (line 10) | private Game() { method getInstance (line 18) | public static Game getInstance() { method getBoard (line 25) | public Board getBoard() { FILE: Java/Ch 07. Object-Oriented Design/Q7_08_Othello/Location.java class Location (line 3) | public class Location { method Location (line 6) | public Location(int r, int c) { method isSameAs (line 11) | public boolean isSameAs(int r, int c) { method getRow (line 15) | public int getRow() { method getColumn (line 19) | public int getColumn() { FILE: Java/Ch 07. Object-Oriented Design/Q7_08_Othello/Piece.java class Piece (line 3) | public class Piece { method Piece (line 6) | public Piece(Color c) { method flip (line 10) | public void flip() { method getColor (line 18) | public Color getColor() { FILE: Java/Ch 07. Object-Oriented Design/Q7_08_Othello/Player.java class Player (line 3) | public class Player { method Player (line 5) | public Player(Color c) { method getScore (line 9) | public int getScore() { method playPiece (line 13) | public boolean playPiece(int row, int column) { method getColor (line 17) | public Color getColor() { FILE: Java/Ch 07. Object-Oriented Design/Q7_08_Othello/Question.java class Question (line 3) | public class Question { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 07. Object-Oriented Design/Q7_09_Circular_Array/CircularArray.java class CircularArray (line 5) | public class CircularArray implements Iterable { method CircularArray (line 9) | public CircularArray(int size) { method convert (line 13) | private int convert(int index) { method rotate (line 20) | public void rotate(int shiftRight) { method get (line 24) | public T get(int i) { method set (line 31) | public void set(int i, T item) { method iterator (line 35) | public Iterator iterator() { class CircularArrayIterator (line 39) | private class CircularArrayIterator implements Iterator { method CircularArrayIterator (line 42) | public CircularArrayIterator() { } method hasNext (line 44) | @Override method next (line 49) | @Override method remove (line 55) | @Override FILE: Java/Ch 07. Object-Oriented Design/Q7_09_Circular_Array/Question.java class Question (line 3) | public class Question { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 07. Object-Oriented Design/Q7_10_Minesweeper/Board.java class Board (line 9) | public class Board { method Board (line 18) | public Board(int r, int c, int b) { method initializeBoard (line 30) | private void initializeBoard() { method shuffleBoard (line 47) | private void shuffleBoard() { method inBounds (line 72) | private boolean inBounds(int row, int column) { method setNumberedCells (line 79) | private void setNumberedCells() { method printBoard (line 98) | public void printBoard(boolean showUnderside) { method flipCell (line 122) | private boolean flipCell(Cell cell) { method expandBlank (line 131) | public void expandBlank(Cell cell) { method playFlip (line 158) | public UserPlayResult playFlip(UserPlay play) { method getCellAtLocation (line 186) | public Cell getCellAtLocation(UserPlay play) { method getNumRemaining (line 195) | public int getNumRemaining() { FILE: Java/Ch 07. Object-Oriented Design/Q7_10_Minesweeper/Cell.java class Cell (line 3) | public class Cell { method Cell (line 11) | public Cell(int r, int c) { method setRowAndColumn (line 18) | public void setRowAndColumn(int r, int c) { method setBomb (line 23) | public void setBomb(boolean bomb) { method incrementNumber (line 28) | public void incrementNumber() { method getRow (line 32) | public int getRow() { method getColumn (line 36) | public int getColumn() { method isBomb (line 40) | public boolean isBomb() { method isBlank (line 44) | public boolean isBlank() { method isExposed (line 48) | public boolean isExposed() { method flip (line 52) | public boolean flip() { method toggleGuess (line 57) | public boolean toggleGuess() { method isGuess (line 64) | public boolean isGuess() { method toString (line 68) | @Override method getSurfaceState (line 73) | public String getSurfaceState() { method getUndersideState (line 83) | public String getUndersideState() { FILE: Java/Ch 07. Object-Oriented Design/Q7_10_Minesweeper/Game.java class Game (line 5) | public class Game { type GameState (line 6) | public enum GameState { method Game (line 16) | public Game(int r, int c, int b) { method initialize (line 23) | public boolean initialize() { method start (line 34) | public boolean start() { method printGameState (line 41) | public void printGameState() { method playGame (line 54) | private boolean playGame() { FILE: Java/Ch 07. Object-Oriented Design/Q7_10_Minesweeper/Question.java class Question (line 3) | public class Question { method main (line 4) | public static void main(String[] args) { FILE: Java/Ch 07. Object-Oriented Design/Q7_10_Minesweeper/UserPlay.java class UserPlay (line 3) | public class UserPlay { method UserPlay (line 8) | private UserPlay(int r, int c, boolean guess) { method fromString (line 14) | public static UserPlay fromString(String input) { method isGuess (line 36) | public boolean isGuess() { method isMove (line 40) | public boolean isMove() { method getColumn (line 44) | public int getColumn() { method setColumn (line 48) | public void setColumn(int column) { method getRow (line 52) | public int getRow() { method setRow (line 56) | public void setRow(int row) { FILE: Java/Ch 07. Object-Oriented Design/Q7_10_Minesweeper/UserPlayResult.java class UserPlayResult (line 3) | public class UserPlayResult { method UserPlayResult (line 6) | public UserPlayResult(boolean success, Game.GameState state) { method successfulMove (line 11) | public boolean successfulMove() { method getResultingState (line 15) | public Game.GameState getResultingState() { FILE: Java/Ch 07. Object-Oriented Design/Q7_11_File_System/Directory.java class Directory (line 5) | public class Directory extends Entry { method Directory (line 8) | public Directory(String n, Directory p) { method getContents (line 13) | protected ArrayList getContents() { method size (line 17) | public int size() { method numberOfFiles (line 25) | public int numberOfFiles() { method deleteEntry (line 39) | public boolean deleteEntry(Entry entry) { method addEntry (line 43) | public void addEntry(Entry entry) { FILE: Java/Ch 07. Object-Oriented Design/Q7_11_File_System/Entry.java class Entry (line 3) | public abstract class Entry { method Entry (line 10) | public Entry(String n, Directory p) { method delete (line 16) | public boolean delete() { method size (line 23) | public abstract int size(); method getFullPath (line 25) | public String getFullPath() { method getCreationTime (line 33) | public long getCreationTime() { method getLastUpdatedTime (line 37) | public long getLastUpdatedTime() { method getLastAccessedTime (line 41) | public long getLastAccessedTime() { method changeName (line 45) | public void changeName(String n) { method getName (line 49) | public String getName() { FILE: Java/Ch 07. Object-Oriented Design/Q7_11_File_System/File.java class File (line 3) | public class File extends Entry { method File (line 7) | public File(String n, Directory p, int sz) { method size (line 12) | public int size() { method getContents (line 16) | public String getContents() { method setContents (line 20) | public void setContents(String c) { FILE: Java/Ch 07. Object-Oriented Design/Q7_11_File_System/Question.java class Question (line 3) | public class Question { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 07. Object-Oriented Design/Q7_12_Hash_Table/Dummy.java class Dummy (line 3) | public class Dummy { method Dummy (line 6) | public Dummy(String n, int a) { method toString (line 11) | @Override method getAge (line 16) | public int getAge() { method getName (line 20) | public String getName() { FILE: Java/Ch 07. Object-Oriented Design/Q7_12_Hash_Table/Hasher.java class Hasher (line 5) | public class Hasher { class LinkedListNode (line 6) | private static class LinkedListNode { method LinkedListNode (line 11) | public LinkedListNode(K k, V v) { method printForward (line 16) | public String printForward() { method Hasher (line 27) | public Hasher(int capacity) { method put (line 37) | public V put(K key, V value) { method remove (line 56) | public V remove(K key) { method get (line 77) | public V get(K key) { method getNodeForKey (line 84) | private LinkedListNode getNodeForKey(K key) { method getIndexForKey (line 97) | public int getIndexForKey(K key) { method printTable (line 101) | public void printTable() { FILE: Java/Ch 07. Object-Oriented Design/Q7_12_Hash_Table/Question.java class Question (line 3) | public class Question { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Introduction/FibonacciA.java class FibonacciA (line 3) | public class FibonacciA { method fibonacci (line 4) | public static int fibonacci(int i) { method main (line 17) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Introduction/FibonacciB.java class FibonacciB (line 3) | public class FibonacciB { method fibonacci (line 4) | public static int fibonacci(int n) { method fibonacci (line 8) | public static int fibonacci(int i, int[] memo) { method main (line 21) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Introduction/FibonacciC.java class FibonacciC (line 3) | public class FibonacciC { method fibonacci (line 5) | public static int fibonacci(int n) { method main (line 21) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Introduction/FibonacciD.java class FibonacciD (line 3) | public class FibonacciD { method fibonacci (line 4) | public static int fibonacci(int n) { method main (line 19) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_01_Triple_Step/QuestionA.java class QuestionA (line 3) | public class QuestionA { method countWays (line 5) | public static int countWays(int n) { method main (line 15) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_01_Triple_Step/QuestionB.java class QuestionB (line 5) | public class QuestionB { method countWays (line 7) | public static int countWays(int n) { method countWays (line 13) | public static int countWays(int n, int[] memo) { method main (line 26) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_01_Triple_Step/Tester.java class Tester (line 3) | public class Tester { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_02_Robot_in_a_Grid/Point.java class Point (line 3) | public class Point { method Point (line 5) | public Point(int row, int column) { method toString (line 10) | @Override method hashCode (line 15) | @Override method equals (line 20) | @Override FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_02_Robot_in_a_Grid/QuestionA.java class QuestionA (line 7) | public class QuestionA { method getPath (line 9) | public static ArrayList getPath(boolean[][] maze) { method getPath (line 18) | public static boolean getPath(boolean[][] maze, int row, int col, Arra... method main (line 36) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_02_Robot_in_a_Grid/QuestionB.java class QuestionB (line 9) | public class QuestionB { method getPath (line 10) | public static ArrayList getPath(boolean[][] maze) { method getPath (line 20) | public static boolean getPath(boolean[][] maze, int row, int col, Arra... method main (line 45) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_02_Robot_in_a_Grid/Tester.java class Tester (line 7) | public class Tester { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_03_Magic_Index/Question.java class Question (line 7) | public class Question { method magicSlow (line 9) | public static int magicSlow(int[] array) { method magicFast (line 18) | public static int magicFast(int[] array, int start, int end) { method magicFast (line 32) | public static int magicFast(int[] array) { method getDistinctSortedArray (line 37) | public static int[] getDistinctSortedArray(int size) { method main (line 50) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_03_Magic_Index/QuestionB.java class QuestionB (line 7) | public class QuestionB { method magicSlow (line 9) | public static int magicSlow(int[] array) { method magicFast (line 18) | public static int magicFast(int[] array, int start, int end) { method magicFast (line 41) | public static int magicFast(int[] array) { method getSortedArray (line 46) | public static int[] getSortedArray(int size) { method main (line 52) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_04_Power_Set/QuestionA.java class QuestionA (line 5) | public class QuestionA { method getSubsets (line 7) | public static ArrayList> getSubsets(ArrayList convertIntToSet(int x, ArrayList> getSubsets(ArrayList getPerms(String str) { method insertCharAt (line 29) | public static String insertCharAt(String word, char c, int i) { method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_07_Permutations_Without_Dups/QuestionB.java class QuestionB (line 5) | public class QuestionB { method getPerms (line 6) | public static ArrayList getPerms(String remainder) { method main (line 32) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_07_Permutations_Without_Dups/QuestionC.java class QuestionC (line 5) | public class QuestionC { method getPerms (line 7) | public static void getPerms(String prefix, String remainder, ArrayList... method getPerms (line 20) | public static ArrayList getPerms(String str) { method main (line 26) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_08_Permutations_With_Dups/Question.java class Question (line 6) | public class Question { method buildFreqTable (line 7) | public static HashMap buildFreqTable(String s) { method printPerms (line 18) | public static void printPerms(HashMap map, String ... method printPerms (line 34) | public static ArrayList printPerms(String s) { method main (line 41) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_09_Parens/QuestionA.java class QuestionA (line 6) | public class QuestionA { method insertInside (line 7) | public static String insertInside(String str, int leftIndex) { method generateParens (line 13) | public static Set generateParens(int remaining) { method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_09_Parens/QuestionB.java class QuestionB (line 5) | public class QuestionB { method addParen (line 7) | public static void addParen(ArrayList list, int leftRem, int r... method generateParens (line 21) | public static ArrayList generateParens(int count) { method main (line 28) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_10_Paint_Fill/Question.java class Question (line 3) | public class Question { type Color (line 5) | public enum Color { method PrintColor (line 9) | public static String PrintColor(Color c) { method PrintScreen (line 25) | public static void PrintScreen(Color[][] screen) { method randomInt (line 34) | public static int randomInt(int n) { method PaintFill (line 38) | public static boolean PaintFill(Color[][] screen, int r, int c, Color ... method PaintFill (line 52) | public static boolean PaintFill(Color[][] screen, int r, int c, Color ... method main (line 57) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_11_Coins/Question.java class Question (line 3) | public class Question { method makeChangeHelper (line 4) | public static int makeChangeHelper(int total, int[] denoms, int index) { method makeChange (line 18) | public static int makeChange(int amount, int[] denoms) { method main (line 22) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_11_Coins/QuestionB.java class QuestionB (line 3) | public class QuestionB { method makeChange (line 5) | public static int makeChange(int n, int[] denoms) { method makeChangeHelper (line 10) | public static int makeChangeHelper(int total, int[] denoms, int index,... method main (line 33) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_11_Coins/Tester.java class Tester (line 3) | public class Tester { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_12_Eight_Queens/Question.java class Question (line 5) | public class Question { method checkValid (line 13) | public static boolean checkValid(Integer[] columns, int row1, int colu... method placeQueens (line 34) | public static void placeQueens(int row, Integer[] columns, ArrayList boards) { method main (line 86) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_13_Stack_of_Boxes/Box.java class Box (line 3) | public class Box { method Box (line 7) | public Box(int w, int h, int d) { method canBeUnder (line 13) | public boolean canBeUnder(Box b) { method canBeAbove (line 20) | public boolean canBeAbove(Box b) { method toString (line 30) | public String toString() { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_13_Stack_of_Boxes/BoxComparator.java class BoxComparator (line 5) | public class BoxComparator implements Comparator { method compare (line 6) | @Override FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_13_Stack_of_Boxes/QuestionA.java class QuestionA (line 6) | public class QuestionA { method createStack (line 7) | public static int createStack(ArrayList boxes) { method createStack (line 17) | public static int createStack(ArrayList boxes, int bottomIndex) { method main (line 31) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_13_Stack_of_Boxes/QuestionB.java class QuestionB (line 6) | public class QuestionB { method createStack (line 7) | public static int createStack(ArrayList boxes) { method createStack (line 18) | public static int createStack(ArrayList boxes, int bottomIndex, i... method main (line 37) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_13_Stack_of_Boxes/QuestionC.java class QuestionC (line 6) | public class QuestionC { method createStack (line 7) | public static int createStack(ArrayList boxes) { method createStack (line 13) | public static int createStack(ArrayList boxes, Box bottom, int of... method main (line 36) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_13_Stack_of_Boxes/Tester.java class Tester (line 6) | public class Tester { method createRandomBox (line 8) | public static Box createRandomBox() { method main (line 13) | public static void main(String[] args) { FILE: Java/Ch 08. Recursion and Dynamic Programming/Q8_14_Boolean_Evaluation/Others.java class Others (line 5) | public class Others { type Term (line 6) | public enum Term { method reduce (line 16) | public static String reduce(String expression, int start, int end) { method evaluate (line 74) | public static boolean evaluate(String expression, int start, int end) { method isOperator (line 83) | public static boolean isOperator(char c) { method insertParensAround (line 94) | public static String insertParensAround(String expression, int ind) { method bruteForce (line 139) | public static int bruteForce(String expression, HashMap map) { method getRandomOperator (line 20) | public static char getRandomOperator() { method getRandomExpression (line 27) | public static String getRandomExpression() { method main (line 43) | public static void main(String[] args) { FILE: Java/Ch 09. Scalability and Memory Limits/Q9_02_Social_Network/BFSData.java class BFSData (line 7) | public class BFSData { method BFSData (line 11) | public BFSData(Person root) { method isFinished (line 17) | public boolean isFinished() { FILE: Java/Ch 09. Scalability and Memory Limits/Q9_02_Social_Network/Machine.java class Machine (line 5) | public class Machine { method getPersonWithID (line 9) | public Person getPersonWithID(int personID) { FILE: Java/Ch 09. Scalability and Memory Limits/Q9_02_Social_Network/PathNode.java class PathNode (line 5) | public class PathNode { method PathNode (line 8) | public PathNode(Person p, PathNode previous) { method getPerson (line 13) | public Person getPerson() { method collapse (line 17) | public LinkedList collapse(boolean startsWithRoot) { FILE: Java/Ch 09. Scalability and Memory Limits/Q9_02_Social_Network/Person.java class Person (line 5) | public class Person { method getInfo (line 10) | public String getInfo() { return info; } method setInfo (line 11) | public void setInfo(String info) { method getFriends (line 15) | public ArrayList getFriends() { method getID (line 19) | public int getID() { return personID; } method addFriend (line 20) | public void addFriend(int id) { friends.add(id); } method Person (line 22) | public Person(int id) { FILE: Java/Ch 09. Scalability and Memory Limits/Q9_02_Social_Network/QuestionA.java class QuestionA (line 9) | public class QuestionA { method findPathBFS (line 10) | public static LinkedList findPathBFS(HashMap ... method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 09. Scalability and Memory Limits/Q9_02_Social_Network/QuestionB.java class QuestionB (line 9) | public class QuestionB { method mergePaths (line 11) | public static LinkedList mergePaths(BFSData bfs1, BFSData bfs2... method searchLevel (line 22) | public static Person searchLevel(HashMap people, BFSD... method findPathBiBFS (line 51) | public static LinkedList findPathBiBFS(HashMap path) { method isEqual (line 18) | public static boolean isEqual(LinkedList path1, LinkedList path1, LinkedLis... method main (line 41) | public static void main(String[] args) { FILE: Java/Ch 09. Scalability and Memory Limits/Q9_05_Cache/Cache.java class Cache (line 5) | public class Cache { method Cache (line 12) | public Cache() { method moveToFront (line 16) | public void moveToFront(Node node) { method moveToFront (line 33) | public void moveToFront(String query) { method removeFromLinkedList (line 38) | public void removeFromLinkedList(Node node) { method getResults (line 69) | public String[] getResults(String query) { method insertResults (line 78) | public void insertResults(String query, String[] results) { FILE: Java/Ch 09. Scalability and Memory Limits/Q9_05_Cache/Node.java class Node (line 3) | public class Node { method Node (line 9) | public Node(String q, String[] res) { FILE: Java/Ch 09. Scalability and Memory Limits/Q9_05_Cache/Question.java class Question (line 3) | public class Question { method generateResults (line 5) | public static String[] generateResults(int i) { method main (line 10) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Introduction/BinarySearch.java class BinarySearch (line 3) | public class BinarySearch { method binarySearch (line 5) | public static int binarySearch(int[] a, int x) { method binarySearchRecursive (line 23) | public static int binarySearchRecursive(int[] a, int x, int low, int h... method binarySearchRecursiveClosest (line 37) | public static int binarySearchRecursiveClosest(int[] a, int x, int low... method main (line 57) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Introduction/MergeSort.java class MergeSort (line 5) | public class MergeSort { method mergesort (line 6) | public static void mergesort(int[] array) { method mergesort (line 11) | public static void mergesort(int[] array, int[] helper, int low, int h... method merge (line 20) | public static void merge(int[] array, int[] helper, int low, int middl... method main (line 52) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Introduction/Quicksort.java class Quicksort (line 5) | public class Quicksort { method swap (line 6) | public static void swap(int[] array, int i, int j) { method partition (line 12) | public static int partition(int[] arr, int left, int right) { method quickSort (line 36) | public static void quickSort(int[] arr, int left, int right) { method main (line 46) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_01_Sorted_Merge/Question.java class Question (line 5) | public class Question { method merge (line 14) | public static void merge(int[] a, int[] b, int countA, int countB) { method main (line 32) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_02_Group_Anagrams/AnagramComparator.java class AnagramComparator (line 6) | public class AnagramComparator implements Comparator { method sortChars (line 7) | private String sortChars(String s) { method compare (line 13) | public int compare(String s1, String s2) { FILE: Java/Ch 10. Sorting and Searching/Q10_02_Group_Anagrams/Question.java class Question (line 7) | public class Question { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_02_Group_Anagrams/QuestionB.java class QuestionB (line 9) | public class QuestionB { method sort (line 10) | public static void sort(String[] array) { method sortChars (line 30) | public static String sortChars(String s) { method main (line 36) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_03_Search_in_Rotated_Array/Question.java class Question (line 3) | public class Question { method search (line 5) | public static int search(int a[], int x) { method search (line 10) | public static int search(int a[], int left, int right, int x) { method main (line 50) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_04_Sorted_Search_No_Size/Arrayish/Listy.java class Listy (line 3) | public class Listy { method Listy (line 6) | public Listy(int[] arr) { method elementAt (line 10) | public int elementAt(int index) { FILE: Java/Ch 10. Sorting and Searching/Q10_04_Sorted_Search_No_Size/Arrayish/Question.java class Question (line 3) | public class Question { method binarySearch (line 5) | public static int binarySearch(Listy list, int value, int low, int hig... method search (line 22) | public static int search(Listy list, int value) { method main (line 30) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_05_Sparse_Search/QuestionA.java class QuestionA (line 3) | public class QuestionA { method search (line 4) | public static int search(String[] strings, String str, int first, int ... method search (line 41) | public static int search(String[] strings, String str) { method main (line 48) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_05_Sparse_Search/QuestionB.java class QuestionB (line 3) | public class QuestionB { method searchI (line 4) | public static int searchI(String[] strings, String str, int first, int... method searchR (line 40) | public static int searchR(String[] strings, String str, int first, int... method search (line 77) | public static int search(String[] strings, String str) { method main (line 84) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_07_Missing_Int/QuestionA.java class QuestionA (line 8) | public class QuestionA { method findOpenNumber (line 12) | public static void findOpenNumber() throws FileNotFoundException { method main (line 35) | public static void main(String[] args) throws IOException { FILE: Java/Ch 10. Sorting and Searching/Q10_07_Missing_Int/QuestionB.java class QuestionB (line 6) | public class QuestionB { method findOpenNumber (line 8) | public static int findOpenNumber(String filename) throws FileNotFoundE... method getCountPerBlock (line 30) | public static int[] getCountPerBlock(String filename, int rangeSize) t... method findBlockWithMissing (line 44) | public static int findBlockWithMissing(int[] blocks, int rangeSize) { method getBitVectorForRange (line 54) | public static byte[] getBitVectorForRange(String filename, int blockIn... method findZero (line 75) | public static int findZero(byte b) { method findZero (line 86) | public static int findZero(byte[] bitVector) { method generateFile (line 96) | public static void generateFile(String filename, int max, int missing)... method main (line 111) | public static void main(String[] args) throws FileNotFoundException { FILE: Java/Ch 10. Sorting and Searching/Q10_08_Find_Duplicates/BitSet.java class BitSet (line 3) | class BitSet { method BitSet (line 6) | public BitSet(int size) { method get (line 10) | boolean get(int pos) { method set (line 16) | void set(int pos) { FILE: Java/Ch 10. Sorting and Searching/Q10_08_Find_Duplicates/Question.java class Question (line 5) | public class Question { method checkDuplicates (line 7) | public static void checkDuplicates(int[] array) { method main (line 20) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_09_Sorted_Matrix_Search/Coordinate.java class Coordinate (line 3) | public class Coordinate implements Cloneable { method Coordinate (line 6) | public Coordinate(int r, int c) { method inbounds (line 11) | public boolean inbounds(int[][] matrix) { method isBefore (line 18) | public boolean isBefore(Coordinate p) { method clone (line 22) | public Object clone() { method moveDownRight (line 26) | public void moveDownRight() { method setToAverage (line 31) | public void setToAverage(Coordinate min, Coordinate max) { FILE: Java/Ch 10. Sorting and Searching/Q10_09_Sorted_Matrix_Search/QuestionA.java class QuestionA (line 4) | public class QuestionA { method findElement (line 6) | public static boolean findElement(int[][] matrix, int elem) { method main (line 21) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_09_Sorted_Matrix_Search/QuestionB.java class QuestionB (line 4) | public class QuestionB { method partitionAndSearch (line 6) | public static Coordinate partitionAndSearch(int[][] matrix, Coordinate... method findElement (line 19) | public static Coordinate findElement(int[][] matrix, Coordinate origin... method findElement (line 53) | public static Coordinate findElement(int[][] matrix, int x) { method main (line 59) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_10_Rank_from_Stream/IntComparable.java class IntComparable (line 5) | public class IntComparable implements Comparator{ method compare (line 7) | @Override FILE: Java/Ch 10. Sorting and Searching/Q10_10_Rank_from_Stream/Question.java class Question (line 5) | public class Question { method track (line 8) | public static void track(int number) { method getRankOfNumber (line 16) | public static int getRankOfNumber(int number) { method main (line 20) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_10_Rank_from_Stream/RankNode.java class RankNode (line 3) | public class RankNode { method RankNode (line 8) | public RankNode(int d) { method insert (line 12) | public void insert(int d) { method getRank (line 29) | public int getRank(int d) { FILE: Java/Ch 10. Sorting and Searching/Q10_11_Peaks_and_Valleys/QuestionA.java class QuestionA (line 7) | public class QuestionA { method sortValleyPeak (line 8) | public static void sortValleyPeak(int[] array) { method swap (line 15) | public static void swap(int[] array, int left, int right) { method main (line 21) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_11_Peaks_and_Valleys/QuestionB.java class QuestionB (line 5) | public class QuestionB { method swap (line 6) | public static void swap(int[] array, int left, int right) { method sortValleyPeak (line 12) | public static void sortValleyPeak(int[] array) { method maxIndex (line 21) | public static int maxIndex(int[] array, int a, int b, int c) { method main (line 38) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_11_Peaks_and_Valleys/QuestionC.java class QuestionC (line 5) | public class QuestionC { method swap (line 6) | public static void swap(int[] array, int left, int right) { method sortValleyPeak (line 12) | public static void sortValleyPeak(int[] array) { method main (line 23) | public static void main(String[] args) { FILE: Java/Ch 10. Sorting and Searching/Q10_11_Peaks_and_Valleys/Tester.java class Tester (line 5) | public class Tester { method confirmValleyPeak (line 6) | public static boolean confirmValleyPeak(int[] array) { method main (line 22) | public static void main(String[] args) { FILE: Java/Ch 13. Java/Introduction/Ambiguous.java class Ambiguous (line 3) | public class Ambiguous extends Shape { method computeArea (line 6) | public double computeArea() { FILE: Java/Ch 13. Java/Introduction/Circle.java class Circle (line 3) | public class Circle extends Shape { method printMe (line 5) | public void printMe() { method computeArea (line 9) | public double computeArea() { FILE: Java/Ch 13. Java/Introduction/Introduction.java class Introduction (line 3) | public class Introduction { method lem (line 4) | public static String lem() { method foo (line 9) | public static String foo() { method bar (line 26) | public static void bar() { method main (line 33) | public static void main(String[] args) { FILE: Java/Ch 13. Java/Introduction/IntroductionCollections.java class IntroductionCollections (line 9) | public class IntroductionCollections { method main (line 10) | public static void main(String[] args) { FILE: Java/Ch 13. Java/Introduction/IntroductionOverriding.java class IntroductionOverriding (line 3) | public class IntroductionOverriding { method printArea (line 5) | public static void printArea(Circle c) { method printArea (line 9) | public static void printArea(Square s) { method printArea (line 13) | public static void printArea(Ambiguous s) { method main (line 17) | public static void main(String[] args) { FILE: Java/Ch 13. Java/Introduction/Shape.java class Shape (line 3) | public abstract class Shape { method printMe (line 4) | public void printMe() { method computeArea (line 8) | public abstract double computeArea(); FILE: Java/Ch 13. Java/Introduction/Square.java class Square (line 3) | public class Square extends Shape { method printMe (line 5) | public void printMe() { method computeArea (line 9) | public double computeArea() { FILE: Java/Ch 13. Java/Q13_01_Private_Constructor/Question.java class Question (line 3) | public class Question { method Question (line 4) | private Question() { class A (line 8) | static class A { method A (line 9) | private A() { class B (line 13) | static class B extends A { method B (line 14) | public B() { method main (line 18) | public static void main(String[] args) { FILE: Java/Ch 13. Java/Q13_05_TreeMap_HashMap_LinkedHashMap/Question.java class Question (line 8) | public class Question { method insertAndPrint (line 9) | public static void insertAndPrint(AbstractMap map) { method main (line 20) | public static void main(String[] args) { FILE: Java/Ch 13. Java/Q13_06_Object_Reflection/Question.java class Question (line 5) | public class Question { method main (line 6) | public static void main(String args[]) { FILE: Java/Ch 13. Java/Q13_06_Object_Reflection/Rectangle.java class Rectangle (line 3) | public class Rectangle { method Rectangle (line 6) | public Rectangle(double w, double h) { method area (line 11) | public double area() { FILE: Java/Ch 13. Java/Q13_07_Lambda_Expressions/Country.java class Country (line 3) | public class Country { method Country (line 7) | public Country(String n, String c, int sz) { method getName (line 13) | public String getName() { method getContinent (line 17) | public String getContinent() { method getPopulation (line 21) | public int getPopulation() { FILE: Java/Ch 13. Java/Q13_07_Lambda_Expressions/QuestionA.java class QuestionA (line 6) | public class QuestionA { method getPopulation (line 8) | public static int getPopulation(List countries, String contin... method main (line 18) | public static void main(String... args) { FILE: Java/Ch 13. Java/Q13_07_Lambda_Expressions/QuestionB.java class QuestionB (line 7) | public class QuestionB { method getPopulation (line 8) | public static int getPopulation(List countries, String contin... method main (line 18) | public static void main(String... args) { FILE: Java/Ch 13. Java/Q13_07_Lambda_Expressions/QuestionC.java class QuestionC (line 7) | public class QuestionC { method getPopulation (line 8) | public static int getPopulation(List countries, String contin... method main (line 14) | public static void main(String... args) { FILE: Java/Ch 13. Java/Q13_07_Lambda_Expressions/Tester.java class Tester (line 5) | public class Tester { method main (line 7) | public static void main(String[] args) { FILE: Java/Ch 13. Java/Q13_08_Lambda_Random/QuestionA.java class QuestionA (line 7) | public class QuestionA { method getRandomSubset (line 9) | public static List getRandomSubset(List list) { method main (line 20) | public static void main(String... args) { FILE: Java/Ch 13. Java/Q13_08_Lambda_Random/QuestionB.java class QuestionB (line 8) | public class QuestionB { method getRandomSubset (line 9) | public static List getRandomSubset(List list) { method main (line 17) | public static void main(String... args) { FILE: Java/Ch 13. Java/Q13_08_Lambda_Random/QuestionC.java class QuestionC (line 9) | public class QuestionC { method getRandomSubset (line 15) | public static List getRandomSubset(List list) { method main (line 21) | public static void main(String... args) { FILE: Java/Ch 15. Threads and Locks/IntroductionA/ExampleA.java class ExampleA (line 3) | public class ExampleA { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 15. Threads and Locks/IntroductionA/RunnableThreadExample.java class RunnableThreadExample (line 3) | public class RunnableThreadExample implements Runnable { method run (line 6) | public void run() { FILE: Java/Ch 15. Threads and Locks/IntroductionB/ExampleB.java class ExampleB (line 3) | public class ExampleB { method main (line 4) | public static void main(String args[]) { FILE: Java/Ch 15. Threads and Locks/IntroductionB/ThreadExample.java class ThreadExample (line 3) | public class ThreadExample extends Thread { method run (line 6) | public void run() { FILE: Java/Ch 15. Threads and Locks/IntroductionLocks/Intro.java class Intro (line 3) | public class Intro { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 15. Threads and Locks/IntroductionLocks/LockedATM.java class LockedATM (line 6) | public class LockedATM { method LockedATM (line 10) | public LockedATM() { method withdraw (line 14) | public int withdraw(int value) { method deposit (line 27) | public int deposit(int value) { method getBalance (line 40) | public int getBalance() { FILE: Java/Ch 15. Threads and Locks/IntroductionLocks/MyClass.java class MyClass (line 8) | public class MyClass extends Thread { method MyClass (line 15) | public MyClass(NoLockATM atm1, LockedATM atm2) { method run (line 21) | public void run() { method waitUntilDone (line 38) | public void waitUntilDone() { FILE: Java/Ch 15. Threads and Locks/IntroductionLocks/NoLockATM.java class NoLockATM (line 3) | public class NoLockATM { method NoLockATM (line 6) | public NoLockATM() { method withdraw (line 9) | public int withdraw(int value) { method deposit (line 20) | public int deposit(int value) { method getBalance (line 31) | public int getBalance() { FILE: Java/Ch 15. Threads and Locks/IntroductionSynchronization/Intro.java class Intro (line 3) | public class Intro { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 15. Threads and Locks/IntroductionSynchronization/MyClass.java class MyClass (line 3) | public class MyClass extends Thread { method MyClass (line 7) | public MyClass(MyObject obj, String n) { method run (line 12) | public void run() { FILE: Java/Ch 15. Threads and Locks/IntroductionSynchronization/MyObject.java class MyObject (line 3) | public class MyObject { method foo (line 4) | public static synchronized void foo(String name) { method bar (line 14) | public static synchronized void bar(String name) { FILE: Java/Ch 15. Threads and Locks/IntroductionSynchronizedBlocks/Intro.java class Intro (line 3) | public class Intro { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 15. Threads and Locks/IntroductionSynchronizedBlocks/MyClass.java class MyClass (line 3) | public class MyClass extends Thread { method MyClass (line 7) | public MyClass(MyObject obj, String n) { method run (line 12) | public void run() { FILE: Java/Ch 15. Threads and Locks/IntroductionSynchronizedBlocks/MyObject.java class MyObject (line 3) | public class MyObject { method foo (line 4) | public void foo(String name) { FILE: Java/Ch 15. Threads and Locks/IntroductionWaitNotify/Intro.java class Intro (line 3) | public class Intro { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 15. Threads and Locks/IntroductionWaitNotify/MyClass.java class MyClass (line 3) | public class MyClass extends Thread { method MyClass (line 7) | public MyClass(MyObject obj, String n) { method run (line 12) | public void run() { FILE: Java/Ch 15. Threads and Locks/IntroductionWaitNotify/MyObject.java class MyObject (line 3) | public class MyObject { method foo (line 4) | public void foo(String name) { FILE: Java/Ch 15. Threads and Locks/Q15_03_Dining_Philosophers/QuestionA/Chopstick.java class Chopstick (line 6) | public class Chopstick { method Chopstick (line 9) | public Chopstick() { method pickUp (line 13) | public boolean pickUp() { method putDown (line 17) | public void putDown() { FILE: Java/Ch 15. Threads and Locks/Q15_03_Dining_Philosophers/QuestionA/Philosopher.java class Philosopher (line 5) | public class Philosopher extends Thread { method Philosopher (line 12) | public Philosopher(int i, Chopstick left, Chopstick right) { method eat (line 18) | public void eat() { method pickUp (line 29) | public boolean pickUp() { method chew (line 43) | public void chew() { method pause (line 48) | public void pause() { method putDown (line 57) | public void putDown() { method run (line 62) | public void run() { FILE: Java/Ch 15. Threads and Locks/Q15_03_Dining_Philosophers/QuestionA/Question.java class Question (line 3) | public class Question { method leftOf (line 6) | public static int leftOf(int i) { method rightOf (line 10) | public static int rightOf(int i) { method main (line 14) | public static void main(String[] args) { FILE: Java/Ch 15. Threads and Locks/Q15_03_Dining_Philosophers/QuestionB/Chopstick.java class Chopstick (line 6) | public class Chopstick { method Chopstick (line 10) | public Chopstick(int n) { method pickUp (line 15) | public void pickUp() { method putDown (line 19) | public void putDown() { method getNumber (line 23) | public int getNumber() { FILE: Java/Ch 15. Threads and Locks/Q15_03_Dining_Philosophers/QuestionB/Philosopher.java class Philosopher (line 5) | public class Philosopher extends Thread { method Philosopher (line 12) | public Philosopher(int i, Chopstick left, Chopstick right) { method eat (line 23) | public void eat() { method pickUp (line 31) | public void pickUp() { method chew (line 39) | public void chew() { method pause (line 44) | public void pause() { method putDown (line 53) | public void putDown() { method run (line 58) | public void run() { FILE: Java/Ch 15. Threads and Locks/Q15_03_Dining_Philosophers/QuestionB/Question.java class Question (line 3) | public class Question { method leftOf (line 6) | public static int leftOf(int i) { method rightOf (line 10) | public static int rightOf(int i) { method main (line 14) | public static void main(String[] args) { FILE: Java/Ch 15. Threads and Locks/Q15_04_Deadlock_Free_Class/LockFactory.java class LockFactory (line 7) | public class LockFactory { method LockFactory (line 16) | private LockFactory(int count) { method getInstance (line 25) | public static LockFactory getInstance() { method initialize (line 29) | public static LockFactory initialize(int count) { method hasCycle (line 36) | public boolean hasCycle(HashMap touchedNodes, int[] ... method declare (line 52) | public boolean declare(int ownerId, int[] resourcesInOrder) { method getLock (line 89) | public Lock getLock(int ownerId, int resourceID) { FILE: Java/Ch 15. Threads and Locks/Q15_04_Deadlock_Free_Class/LockNode.java class LockNode (line 8) | public class LockNode { type VisitState (line 9) | public enum VisitState { method LockNode (line 18) | public LockNode(int id, int max) { method joinTo (line 25) | public void joinTo(LockNode node) { method remove (line 29) | public void remove(LockNode node) { method hasCycle (line 34) | public boolean hasCycle(HashMap touchedNodes) { method hasCycle (line 42) | private boolean hasCycle(VisitState[] visited, HashMap validate, Function... method run (line 20) | public void run() { FILE: Java/Ch 15. Threads and Locks/Q15_07_FizzBuzz/FizzBuzzThread.java class FizzBuzzThread (line 3) | public class FizzBuzzThread extends Thread { method FizzBuzzThread (line 10) | public FizzBuzzThread(boolean div3, boolean div5, int max, String toPr... method print (line 17) | public void print() { method run (line 21) | public void run() { FILE: Java/Ch 15. Threads and Locks/Q15_07_FizzBuzz/NumberThread.java class NumberThread (line 3) | public class NumberThread extends FizzBuzzThread { method NumberThread (line 4) | public NumberThread(boolean div3, boolean div5, int max) { method print (line 8) | public void print() { FILE: Java/Ch 15. Threads and Locks/Q15_07_FizzBuzz/QuestionA.java class QuestionA (line 3) | public class QuestionA { method fizzbuzz (line 5) | public static void fizzbuzz(int n) { method main (line 19) | public static void main(String[] args) { FILE: Java/Ch 15. Threads and Locks/Q15_07_FizzBuzz/QuestionB.java class QuestionB (line 3) | public class QuestionB { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 15. Threads and Locks/Q15_07_FizzBuzz/QuestionC.java class QuestionC (line 3) | public class QuestionC { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_01_Number_Swapper/Question.java class Question (line 3) | public class Question { method swap (line 5) | public static void swap(int a, int b) { method swap_opt (line 15) | public static void swap_opt(int a, int b) { method main (line 24) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_02_Word_Frequencies/QuestionA.java class QuestionA (line 5) | public class QuestionA { method getFrequency (line 6) | public static int getFrequency(String[] book, String word) { method main (line 17) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_02_Word_Frequencies/QuestionB.java class QuestionB (line 7) | public class QuestionB { method setupDictionary (line 8) | public static HashMap setupDictionary(String[] book) { method getFrequency (line 21) | public static int getFrequency(HashMap table, String ... method main (line 32) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_03_Intersection/Line.java class Line (line 4) | public class Line { method Line (line 8) | public Line(Point start, Point end) { method isVertical (line 20) | public boolean isVertical() { method toString (line 24) | @Override method getYFromX (line 29) | public double getYFromX(double x) { FILE: Java/Ch 16. Moderate/Q16_03_Intersection/Point.java class Point (line 3) | public class Point { method Point (line 5) | public Point(double x, double y) { method toString (line 10) | @Override FILE: Java/Ch 16. Moderate/Q16_03_Intersection/Question.java class Question (line 3) | public class Question { method isBetween (line 6) | public static boolean isBetween(double start, double middle, double en... method isBetween (line 15) | public static boolean isBetween(Point start, Point middle, Point end) { method intersection (line 19) | public static Point intersection(Point start1, Point end1, Point start... method main (line 66) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_03_Intersection/Tester.java class Tester (line 5) | public class Tester { method equalish (line 7) | public static boolean equalish(double a, double b) { method checkIfPointOnLineSegments (line 11) | public static boolean checkIfPointOnLineSegments(Point start, Point mi... method getPoints (line 33) | public static ArrayList getPoints(int size) { method runTest (line 43) | public static boolean runTest(Point start1, Point end1, Point start2, ... method main (line 74) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/Piece.java type Piece (line 3) | enum Piece { Empty, Red, Blue } FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/Position.java class Position (line 3) | public class Position { method Position (line 5) | public Position(int row, int column) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/PositionIterator.java class PositionIterator (line 5) | public class PositionIterator implements Iterator { method PositionIterator (line 9) | public PositionIterator(Position p, int rowIncrement, int colIncrement... method hasNext (line 16) | @Override method next (line 21) | @Override FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/QuestionA.java class QuestionA (line 3) | public class QuestionA { method convertBoardToInt (line 5) | public static int convertBoardToInt(Piece[][] board) { method main (line 16) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/QuestionB.java class QuestionB (line 6) | public class QuestionB { method hasWon (line 7) | public static Piece hasWon(Piece[][] board, int row, int column) { method hasWonRow (line 28) | public static boolean hasWonRow(Piece[][] board, int row) { method hasWonColumn (line 37) | public static boolean hasWonColumn(Piece[][] board, int column) { method hasWonDiagonal (line 46) | public static boolean hasWonDiagonal(Piece[][] board, int direction) { method main (line 60) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/QuestionC.java class QuestionC (line 5) | public class QuestionC { method hasWinner (line 6) | public static boolean hasWinner(Piece p1, Piece p2, Piece p3) { method hasWon (line 13) | public static Piece hasWon(Piece[][] board) { method main (line 38) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/QuestionD.java class QuestionD (line 5) | public class QuestionD { method hasWinner (line 6) | public static boolean hasWinner(Piece p1, Piece p2, Piece p3) { method hasWon (line 13) | public static Piece hasWon(Piece[][] board) { method main (line 37) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/QuestionE.java class QuestionE (line 5) | public class QuestionE { method hasWon (line 7) | public static Piece hasWon(Piece[][] board) { method main (line 64) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/QuestionF.java class QuestionF (line 5) | public class QuestionF { method hasWon (line 7) | public static Piece hasWon(Piece[][] board) { method hasWon (line 36) | public static Piece hasWon(Piece[][] board, int row, int col, int incr... method main (line 48) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/QuestionG.java class QuestionG (line 7) | public class QuestionG { class Check (line 8) | public static class Check { method Check (line 11) | public Check(int row, int column, int rowI, int colI) { method increment (line 18) | public void increment() { method inBounds (line 23) | public boolean inBounds(int size) { method hasWon (line 29) | public static Piece hasWon(Piece[][] board) { method hasWon (line 52) | public static Piece hasWon(Piece[][] board, Check instr) { method main (line 63) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/QuestionH.java class QuestionH (line 7) | public class QuestionH { method hasWon (line 8) | public static Piece hasWon(Piece[][] board) { method hasWon (line 29) | public static Piece hasWon(Piece[][] board, PositionIterator iterator) { method main (line 41) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_04_Tic_Tac_Win/Tester.java class Tester (line 5) | public class Tester { method convertIntToPiece (line 6) | public static Piece convertIntToPiece(int i) { method hasWonB (line 19) | public static Piece hasWonB(Piece[][] board) { method main (line 31) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_05_Factorial_Zeros/QuestionA.java class QuestionA (line 3) | public class QuestionA { method factorsOf5 (line 4) | public static int factorsOf5(int i) { method countFactZeros (line 13) | public static int countFactZeros(int num) { method factorial (line 21) | public static int factorial(int num) { method main (line 31) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_05_Factorial_Zeros/QuestionB.java class QuestionB (line 3) | public class QuestionB { method countFactZeros (line 4) | public static int countFactZeros(int num) { method factorial (line 16) | public static int factorial(int num) { method main (line 26) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_06_Smallest_Difference/QuestionA.java class QuestionA (line 3) | public class QuestionA { method findSmallestDifference (line 4) | public static int findSmallestDifference(int[] arrayA, int[] arrayB) { method main (line 16) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_06_Smallest_Difference/QuestionB.java class QuestionB (line 4) | public class QuestionB { method findSmallestDifference (line 5) | public static int findSmallestDifference(int[] arrayA, int[] arrayB) { method main (line 25) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_06_Smallest_Difference/QuestionC.java class QuestionC (line 4) | public class QuestionC { method getClosestValue (line 5) | public static int getClosestValue(int[] array, int target) { method findSmallestDifference (line 26) | public static int findSmallestDifference(int[] shorter, int[] longer) { method main (line 41) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_06_Smallest_Difference/Tester.java class Tester (line 5) | public class Tester { method main (line 6) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_07_Number_Max/Question.java class Question (line 3) | public class Question { method flip (line 5) | public static int flip(int bit) { method sign (line 10) | public static int sign(int a) { method getMaxNaive (line 14) | public static int getMaxNaive(int a, int b) { method getMax (line 20) | public static int getMax(int a, int b) { method main (line 40) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_08_English_Int/Question.java class Question (line 7) | public class Question { method convert (line 14) | public static String convert(int num) { method listToString (line 37) | public static String listToString(LinkedList parts) { method convertChunk (line 47) | public static String convertChunk(int number) { method main (line 73) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_09_Operations/Question.java class Question (line 7) | public class Question { method negate (line 9) | public static int negate(int a) { method negateOptimized (line 20) | public static int negateOptimized(int a) { method minus (line 37) | public static int minus(int a, int b) { method abs (line 42) | public static int abs(int a) { method multiply (line 50) | public static int multiply(int a, int b) { method divide (line 66) | public static int divide(int a, int b) throws java.lang.ArithmeticExce... method main (line 87) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_10_Living_People/Person.java class Person (line 3) | public class Person { method Person (line 6) | public Person(int birthYear, int deathYear) { FILE: Java/Ch 16. Moderate/Q16_10_Living_People/QuestionA.java class QuestionA (line 5) | public class QuestionA { method maxAliveYear (line 7) | public static int maxAliveYear(Person[] people, int min, int max) { method main (line 27) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_10_Living_People/QuestionB.java class QuestionB (line 5) | public class QuestionB { method maxAliveYear (line 7) | public static int maxAliveYear(Person[] people, int min, int max) { method createYearMap (line 15) | public static int[] createYearMap(Person[] people, int min, int max) { method incrementRange (line 26) | public static void incrementRange(int[] values, int left, int right) { method getMaxIndex (line 33) | public static int getMaxIndex(int[] values) { method main (line 43) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_10_Living_People/QuestionC.java class QuestionC (line 6) | public class QuestionC { method maxAliveYear (line 7) | public static int maxAliveYear(Person[] people, int min, int max) { method getSortedYears (line 37) | public static int[] getSortedYears(Person[] people, boolean copyBirthY... method main (line 46) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_10_Living_People/QuestionD.java class QuestionD (line 5) | public class QuestionD { method maxAliveYear (line 7) | public static int maxAliveYear(Person[] people, int min, int max) { method getPopulationDeltas (line 15) | public static int[] getPopulationDeltas(Person[] people, int min, int ... method getMaxAliveYear (line 28) | public static int getMaxAliveYear(int[] deltas) { method main (line 43) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_10_Living_People/Tester.java class Tester (line 5) | public class Tester { method main (line 9) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_11_Diving_Board/QuestionA.java class QuestionA (line 5) | public class QuestionA { method allLengths (line 8) | public static HashSet allLengths(int k, int shorter, int long... method getAllLengths (line 14) | public static void getAllLengths(int k, int total, int shorter, int lo... method main (line 24) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_11_Diving_Board/QuestionB.java class QuestionB (line 5) | public class QuestionB { method allLengths (line 8) | public static HashSet allLengths(int k, int shorter, int long... method getAllLengths (line 15) | public static void getAllLengths(int k, int total, int shorter, int lo... method main (line 30) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_11_Diving_Board/QuestionC.java class QuestionC (line 5) | public class QuestionC { method allLengths (line 8) | public static HashSet allLengths(int k, int shorter, int long... method main (line 19) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_11_Diving_Board/Tester.java class Tester (line 5) | public class Tester { method main (line 7) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_12_XML_Encoding/Attribute.java class Attribute (line 3) | public class Attribute { method Attribute (line 6) | public Attribute(String t, String v) { method getTagCode (line 11) | public String getTagCode() { FILE: Java/Ch 16. Moderate/Q16_12_XML_Encoding/Element.java class Element (line 5) | public class Element { method Element (line 11) | public Element(String n) { method Element (line 17) | public Element(String n, String v) { method getNameCode (line 24) | public String getNameCode() { method insert (line 39) | public void insert(Attribute attribute) { method insert (line 43) | public void insert(Element child) { FILE: Java/Ch 16. Moderate/Q16_12_XML_Encoding/QuestionOO.java class QuestionOO (line 4) | public class QuestionOO { method encode (line 6) | public static void encode(String v, StringBuilder sb) { method encodeEnd (line 12) | public static void encodeEnd(StringBuilder sb) { method encode (line 17) | public static void encode(Attribute attr, StringBuilder sb) { method encode (line 22) | public static void encode(Element root, StringBuilder sb) { method encodeToString (line 38) | public static String encodeToString(Element root) { method main (line 44) | public static void main(String args[]) { FILE: Java/Ch 16. Moderate/Q16_12_XML_Encoding/QuestionString.java class QuestionString (line 9) | public class QuestionString { method QuestionString (line 16) | public QuestionString(Map tagMap) {this.tagMap = tagMap;} method encode (line 18) | public byte[] encode(char[] input) throws IOException { method encodeTokens (line 29) | private void encodeTokens(ByteArrayOutputStream output) method nextToken (line 78) | private String nextToken() throws IOException { method nextToken (line 88) | private void nextToken(String expectedToken) throws IOException { method hasNextToken (line 102) | private boolean hasNextToken(String expectedToken) { method hasNextTokens (line 110) | private boolean hasNextTokens(String... expectedTokens) { method tokenize (line 123) | private void tokenize(char[] input) { method setNextToken (line 131) | private int setNextToken(char[] input, int inputIndex) { method getTagCode (line 158) | private byte getTagCode(String tag) throws IOException { method main (line 166) | public static void main(String args[]) { method print (line 196) | public static void print(byte[] output) { FILE: Java/Ch 16. Moderate/Q16_13_Bisect_Squares/Line.java class Line (line 3) | public class Line { method Line (line 6) | public Line(Point start, Point end) { method toString (line 11) | public String toString() { FILE: Java/Ch 16. Moderate/Q16_13_Bisect_Squares/Point.java class Point (line 3) | public class Point { method Point (line 6) | public Point(double x, double y) { method isEqual (line 11) | public boolean isEqual(Point p) { method toString (line 15) | public String toString() { FILE: Java/Ch 16. Moderate/Q16_13_Bisect_Squares/Question.java class Question (line 3) | public class Question { method randomInt (line 5) | public static int randomInt(int n) { method printLine (line 9) | public static void printLine(Line l) { method printSquare (line 14) | public static void printSquare(Square s) { method isApproxEqual (line 18) | public static boolean isApproxEqual(double d1, double d2) { method isApproxEqual (line 26) | public static boolean isApproxEqual(Point p1, Point p2) { method doTest (line 30) | public static boolean doTest(Square s1, Square s2, Point start, Point ... method doTestFull (line 45) | public static boolean doTestFull(Square s1, Square s2, Point start, Po... method doTests (line 49) | public static void doTests() { method main (line 75) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_13_Bisect_Squares/Square.java class Square (line 3) | public class Square { method Square (line 9) | public Square(double left, double top, double size) { method middle (line 17) | public Point middle() { method contains (line 21) | public boolean contains(Square other) { method extend (line 32) | public Point extend(Point mid1, Point mid2, double size) { method cut (line 66) | public Line cut(Square other) { method toString (line 89) | public String toString() { FILE: Java/Ch 16. Moderate/Q16_14_Best_Line/GraphPoint.java class GraphPoint (line 3) | public class GraphPoint { method GraphPoint (line 6) | public GraphPoint(double x1, double y1) { method toString (line 11) | public String toString() { FILE: Java/Ch 16. Moderate/Q16_14_Best_Line/Line.java class Line (line 3) | public class Line { method Line (line 10) | public Line(GraphPoint p, GraphPoint q) { method isEquivalent (line 20) | public boolean isEquivalent(double a, double b) { method Print (line 24) | public void Print() { method floorToNearestEpsilon (line 28) | public static double floorToNearestEpsilon(double d) { method isEquivalent (line 33) | public boolean isEquivalent(Object o) { FILE: Java/Ch 16. Moderate/Q16_14_Best_Line/Question.java class Question (line 9) | public class Question { method findBestLine (line 11) | public static Line findBestLine(GraphPoint[] points) { method getListOfLines (line 17) | public static HashMapList getListOfLines(GraphPoint[] po... method getBestLine (line 30) | public static Line getBestLine(HashMapList linesBySlope) { method countEquivalentLines (line 57) | public static int countEquivalentLines(HashMapList lines... method countEquivalentLines (line 66) | public static int countEquivalentLines(ArrayList lines, Line lin... method createPoints (line 82) | public static GraphPoint[] createPoints() { method validate (line 100) | public static int validate(Line line, GraphPoint[] points) { method main (line 113) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_15_Master_Mind/Question.java class Question (line 3) | public class Question { method code (line 4) | public static int code(char c) { method letterFromCode (line 19) | public static char letterFromCode(int k) { method estimate (line 36) | public static Result estimate(String guess, String solution) { method main (line 67) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_15_Master_Mind/Result.java class Result (line 3) | public class Result { method Result (line 7) | public Result(int h, int p) { method toString (line 12) | @Override FILE: Java/Ch 16. Moderate/Q16_15_Master_Mind/Tester.java class Tester (line 5) | public class Tester { method estimateBad (line 7) | public static Result estimateBad(String g, String s) { method randomString (line 38) | public static String randomString() { method test (line 52) | public static boolean test(String guess, String solution) { method testRandom (line 63) | public static boolean testRandom() { method test (line 69) | public static boolean test(int count) { method main (line 79) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_16_Sub_Sort/Question.java class Question (line 3) | public class Question { method findEndOfLeftSubsequence (line 5) | public static int findEndOfLeftSubsequence(int[] array) { method findStartOfRightSubsequence (line 14) | public static int findStartOfRightSubsequence(int[] array) { method shrinkLeft (line 23) | public static int shrinkLeft(int[] array, int min_index, int start) { method shrinkRight (line 33) | public static int shrinkRight(int[] array, int max_index, int start) { method findUnsortedSequence (line 43) | public static Range findUnsortedSequence(int[] array) { method validate (line 78) | public static boolean validate(int[] array, int left_index, int right_... method main (line 95) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_16_Sub_Sort/QuestionB.java class QuestionB (line 3) | public class QuestionB { method findRightSequenceStart (line 5) | public static int findRightSequenceStart(int[] array) { method findLeftSequenceEnd (line 17) | public static int findLeftSequenceEnd(int[] array) { method findUnsortedSequence (line 29) | public static Range findUnsortedSequence(int[] array) { method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_16_Sub_Sort/Range.java class Range (line 3) | public class Range { method Range (line 5) | public Range(int start, int end) { method toString (line 10) | @Override method hashCode (line 15) | @Override method equals (line 24) | @Override FILE: Java/Ch 16. Moderate/Q16_16_Sub_Sort/Tester.java class Tester (line 5) | public class Tester { method main (line 7) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_17_Contiguous_Sequence/Question.java class Question (line 3) | public class Question { method getMaxSum (line 5) | public static int getMaxSum(int[] a) { method main (line 19) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_18_Pattern_Matcher/QuestionA.java class QuestionA (line 3) | public class QuestionA { method doesMatch (line 6) | public static boolean doesMatch(String pattern, String value) { method buildFromPattern (line 26) | public static String buildFromPattern(String pattern, String main, Str... method main (line 39) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_18_Pattern_Matcher/QuestionB.java class QuestionB (line 3) | public class QuestionB { method formStringFromPattern (line 5) | public static String formStringFromPattern(String pattern, String firs... method countOf (line 22) | public static int countOf(String pattern, char ch) { method canonical (line 32) | public static String canonical(String pattern) { method doesMatch (line 45) | public static boolean doesMatch(String pattern, String value) { method main (line 73) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_18_Pattern_Matcher/QuestionC.java class QuestionC (line 3) | public class QuestionC { method buildFromPattern (line 5) | public static String buildFromPattern(String pattern, String main, Str... method countOf (line 18) | public static int countOf(String pattern, char c) { method doesMatch (line 28) | public static boolean doesMatch(String pattern, String value) { method main (line 59) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_18_Pattern_Matcher/QuestionD.java class QuestionD (line 3) | public class QuestionD { method doesMatch (line 4) | public static boolean doesMatch(String pattern, String value) { method matches (line 29) | public static boolean matches(String pattern, String value, int mainSi... method isEqual (line 42) | public static boolean isEqual(String s1, int offset1, int offset2, int... method countOf (line 51) | public static int countOf(String pattern, char c) { method main (line 63) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_18_Pattern_Matcher/Tester.java class Tester (line 3) | public class Tester { method invert (line 4) | public static String invert(String pattern) { method main (line 16) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_19_Pond_Sizes/QuestionA.java class QuestionA (line 5) | public class QuestionA { method computePondSizes (line 6) | public static ArrayList computePondSizes(int[][] land) { method computeSize (line 19) | public static int computeSize(int[][] land, int row, int col) { method main (line 34) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_19_Pond_Sizes/QuestionB.java class QuestionB (line 5) | public class QuestionB { method computePondSizes (line 7) | public static ArrayList computePondSizes(int[][] land) { method computeSize (line 21) | public static int computeSize(int[][] land, boolean[][] visited, int r... method main (line 36) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_20_T9/QuestionA.java class QuestionA (line 9) | public class QuestionA { method getT9Chars (line 23) | public static char[] getT9Chars(char digit) { method getValidWords (line 31) | public static void getValidWords(String number, int index, String pref... method getValidT9Words (line 52) | public static ArrayList getValidT9Words(String number, HashSet... method main (line 58) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_20_T9/QuestionB.java class QuestionB (line 10) | public class QuestionB { method getT9Chars (line 24) | public static char[] getT9Chars(char digit) { method getValidWords (line 32) | public static void getValidWords(String number, int index, String pref... method getValidT9Words (line 56) | public static ArrayList getValidT9Words(String number, Trie tr... method main (line 62) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_20_T9/QuestionC.java class QuestionC (line 9) | public class QuestionC { method convertToT9 (line 25) | public static String convertToT9(String word, HashMap createLetterToNumberMap() { method initializeDictionary (line 53) | public static HashMapList initializeDictionary(String[... method getValidT9Words (line 66) | public static ArrayList getValidT9Words(String numbers, HashMa... method main (line 70) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_21_Sum_Swap/QuestionA.java class QuestionA (line 3) | public class QuestionA { method sum (line 5) | public static int sum(int[] array) { method findSwapValues (line 13) | public static int[] findSwapValues(int[] array1, int[] array2) { method main (line 31) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_21_Sum_Swap/QuestionB.java class QuestionB (line 3) | public class QuestionB { method findSwapValues (line 4) | public static int[] findSwapValues(int[] array1, int[] array2) { method getTarget (line 20) | public static Integer getTarget(int[] array1, int[] array2) { method sum (line 29) | public static int sum(int[] array) { method main (line 41) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_21_Sum_Swap/QuestionC.java class QuestionC (line 5) | public class QuestionC { method sum (line 7) | public static int sum(int[] array) { method findSwapValues (line 15) | public static int[] findSwapValues(int[] array1, int[] array2) { method findDifference (line 21) | public static int[] findDifference(int[] array1, int[] array2, int tar... method getTarget (line 34) | public static Integer getTarget(int[] array1, int[] array2) { method getContents (line 42) | public static HashSet getContents(int[] array) { method main (line 50) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_21_Sum_Swap/QuestionD.java class QuestionD (line 6) | public class QuestionD { method sum (line 8) | public static int sum(int[] array) { method getTarget (line 16) | public static Integer getTarget(int[] array1, int[] array2) { method findSwapValues (line 24) | public static int[] findSwapValues(int[] array1, int[] array2) { method findDifference (line 30) | public static int[] findDifference(int[] array1, int[] array2, int tar... method main (line 56) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_21_Sum_Swap/Tester.java class Tester (line 5) | public class Tester { method isEquivalent (line 7) | public static boolean isEquivalent(int[] a, int[] b, int[] c, int[] d) { method difference (line 14) | public static int difference(int[] a) { method arrayToString (line 21) | public static String arrayToString(int[] array) { method main (line 29) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_22_Langtons_Ant/Ant.java class Ant (line 3) | public class Ant { method turn (line 7) | public void turn(boolean clockwise) { method move (line 11) | public void move() { method adjustPosition (line 23) | public void adjustPosition(int shiftRow, int shiftColumn) { FILE: Java/Ch 16. Moderate/Q16_22_Langtons_Ant/Board.java class Board (line 5) | public class Board { method Board (line 11) | public Board() { } method move (line 14) | public void move() { method flip (line 22) | private void flip(Position position) { method ensureFit (line 32) | private void ensureFit(Position position) { method isBlack (line 44) | public boolean isBlack(Position p) { method isBlack (line 49) | public boolean isBlack(int row, int column) { method toString (line 54) | public String toString() { FILE: Java/Ch 16. Moderate/Q16_22_Langtons_Ant/Grid.java class Grid (line 3) | public class Grid { method Grid (line 7) | public Grid() { method copyWithShift (line 12) | private void copyWithShift(boolean[][] oldGrid, boolean[][] newGrid, i... method ensureFit (line 25) | private void ensureFit(Position position) { method flip (line 57) | private void flip(Position position) { method move (line 64) | public void move() { method toString (line 81) | public String toString() { FILE: Java/Ch 16. Moderate/Q16_22_Langtons_Ant/Orientation.java type Orientation (line 3) | public enum Orientation { method getTurn (line 6) | public Orientation getTurn(boolean clockwise) { method toString (line 18) | @Override FILE: Java/Ch 16. Moderate/Q16_22_Langtons_Ant/Position.java class Position (line 3) | public class Position { method Position (line 7) | public Position(int row, int column) { method equals (line 12) | @Override method hashCode (line 21) | @Override method clone (line 26) | public Position clone() { FILE: Java/Ch 16. Moderate/Q16_22_Langtons_Ant/Question.java class Question (line 3) | public class Question { method main (line 5) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_23_Rand7_From_Rand5/Question.java class Question (line 3) | public class Question { method rand7 (line 4) | public static int rand7() { method rand5 (line 13) | public static int rand5() { method main (line 17) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_23_Rand7_From_Rand5/QuestionB.java class QuestionB (line 3) | public class QuestionB { method rand7 (line 4) | public static int rand7() { method rand5 (line 19) | public static int rand5() { method main (line 23) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_24_Pairs_With_Sum/Pair.java class Pair (line 3) | public class Pair { method Pair (line 7) | public Pair(int first, int second) { method toString (line 12) | @Override FILE: Java/Ch 16. Moderate/Q16_24_Pairs_With_Sum/QuestionA.java class QuestionA (line 5) | public class QuestionA { method printPairSums (line 6) | public static ArrayList printPairSums(int[] array, int sum) { method main (line 18) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_24_Pairs_With_Sum/QuestionB.java class QuestionB (line 7) | public class QuestionB { method printPairSums (line 8) | public static ArrayList printPairSums(int[] array, int sum) { method adjustCounterBy (line 23) | public static void adjustCounterBy(HashMap counter, ... method main (line 28) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_24_Pairs_With_Sum/QuestionC.java class QuestionC (line 6) | public class QuestionC { method printPairSums (line 7) | public static ArrayList printPairSums(int[] array, int sum) { method main (line 29) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_24_Pairs_With_Sum/Tester.java class Tester (line 7) | public class Tester { method print (line 9) | public static void print(ArrayList pairs) { method main (line 16) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_25_LRU_Cache/Cache.java class Cache (line 5) | public class Cache { method Cache (line 12) | public Cache(int maxSize) { method getValue (line 17) | public String getValue(int key) { method removeFromLinkedList (line 32) | private void removeFromLinkedList(LinkedListNode node) { method insertAtFrontOfLinkedList (line 51) | private void insertAtFrontOfLinkedList(LinkedListNode node) { method removeKey (line 65) | public boolean removeKey(int key) { method setKeyValue (line 74) | public void setKeyValue(int key, String value) { method getCacheAsString (line 89) | public String getCacheAsString() { class LinkedListNode (line 94) | private class LinkedListNode { method LinkedListNode (line 99) | public LinkedListNode(int k, String v) { method printForward (line 104) | public String printForward() { FILE: Java/Ch 16. Moderate/Q16_25_LRU_Cache/Question.java class Question (line 3) | public class Question { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_26_Calculator/Operator.java type Operator (line 3) | public enum Operator { FILE: Java/Ch 16. Moderate/Q16_26_Calculator/QuestionA.java class QuestionA (line 5) | public class QuestionA { method collapseTerm (line 6) | public static Term collapseTerm(Term primary, Term secondary) { method applyOp (line 15) | public static double applyOp(double left, Operator op, double right) { method compute (line 33) | public static double compute(String sequence) { method main (line 57) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_26_Calculator/QuestionB.java class QuestionB (line 4) | public class QuestionB { type Operator (line 5) | public enum Operator { method parseNextOperator (line 10) | public static Operator parseNextOperator(String sequence, int offset) { method parseNextNumber (line 24) | public static int parseNextNumber(String seq, int offset) { method applyOp (line 34) | public static double applyOp(double left, Operator op, double right) { method priorityOfOperator (line 50) | public static int priorityOfOperator(Operator op) { method collapseTop (line 65) | public static void collapseTop(Operator futureTop, Stack numbe... method compute (line 79) | public static double compute(String sequence) { method main (line 113) | public static void main(String[] args) { FILE: Java/Ch 16. Moderate/Q16_26_Calculator/Term.java class Term (line 5) | public class Term { method Term (line 9) | public Term(double v, Operator op) { method getNumber (line 14) | public double getNumber() { method getOperator (line 18) | public Operator getOperator() { method setNumber (line 22) | public void setNumber(double v) { method parseTermSequence (line 26) | public static ArrayList parseTermSequence(String sequence) { method parseOperator (line 50) | public static Operator parseOperator(char op) { method parseNextNumber (line 60) | public static int parseNextNumber(String sequence, int offset) { FILE: Java/Ch 17. Hard/Q17_01_Add_Without_Plus/QuestionA.java class QuestionA (line 3) | public class QuestionA { method add (line 5) | public static int add(int a, int b) { method main (line 12) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_01_Add_Without_Plus/QuestionB.java class QuestionB (line 3) | public class QuestionB { method add (line 5) | public static int add(int a, int b) { method main (line 15) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_01_Add_Without_Plus/Tester.java class Tester (line 3) | public class Tester { method randomInt (line 4) | public static int randomInt(int n) { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_02_Shuffle/Question.java class Question (line 7) | public class Question { method shuffleArrayRecursively (line 8) | public static int[] shuffleArrayRecursively(int[] cards, int i) { method shuffleArrayIteratively (line 27) | public static void shuffleArrayIteratively(int[] cards) { method main (line 37) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_03_Random_Set/Question.java class Question (line 7) | public class Question { method pickMRandomly (line 11) | public static int[] pickMRandomly(int[] original, int m) { method main (line 22) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_03_Random_Set/QuestionAlternate.java class QuestionAlternate (line 7) | public class QuestionAlternate { method pickMRecursively (line 10) | public static int[] pickMRecursively(int[] original, int m, int i) { method pickMIteratively (line 31) | public static int[] pickMIteratively(int[] original, int m) { method main (line 53) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_04_Missing_Number/BitInteger.java class BitInteger (line 3) | public class BitInteger { method BitInteger (line 6) | public BitInteger() { method BitInteger (line 11) | public BitInteger(int value){ method fetch (line 20) | public int fetch(int k){ method set (line 26) | public void set(int k, int bitValue){ method set (line 32) | public void set(int k, char bitValue){ method set (line 38) | public void set(int k, boolean bitValue){ method swapValues (line 42) | public void swapValues(BitInteger number) { method toInt (line 50) | public int toInt() { FILE: Java/Ch 17. Hard/Q17_04_Missing_Number/Question.java class Question (line 6) | public class Question { method initialize (line 8) | public static ArrayList initialize(int n, int missing) { method findMissing (line 26) | public static int findMissing(ArrayList array) { method findMissing (line 30) | private static int findMissing(ArrayList input, int column) { method main (line 54) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_05_Letters_and_Numbers/QuestionA.java class QuestionA (line 3) | public class QuestionA { method extractSubarray (line 4) | public static char[] extractSubarray(char[] array, int start, int end) { method hasEqualLettersNumbers (line 13) | public static boolean hasEqualLettersNumbers(char[] array, int start, ... method findLongestSubarray (line 25) | public static char[] findLongestSubarray(char[] array) { method main (line 36) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_05_Letters_and_Numbers/QuestionB.java class QuestionB (line 6) | public class QuestionB { method computeDeltaArray (line 9) | public static int[] computeDeltaArray(char[] array) { method findLongestMatch (line 25) | public static int[] findLongestMatch(int[] deltas) { method extract (line 45) | public static char[] extract(char[] array, int start, int end) { method findLongestSubarray (line 54) | public static char[] findLongestSubarray(char[] array) { method isEqual (line 66) | public static boolean isEqual(char[] array, int start, int end) { method main (line 78) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_05_Letters_and_Numbers/Tester.java class Tester (line 3) | public class Tester { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_06_Count_of_2s/Question.java class Question (line 3) | public class Question { method count2sInRangeAtDigit (line 4) | public static int count2sInRangeAtDigit(int number, int d) { method count2sInRange (line 22) | public static int count2sInRange(int number) { method count2sR (line 31) | public static int count2sR(int n) { method main (line 64) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_06_Count_of_2s/QuestionBrute.java class QuestionBrute (line 3) | public class QuestionBrute { method numberOf2s (line 5) | public static int numberOf2s(int n) { method numberOf2sInRange (line 16) | public static int numberOf2sInRange(int n) { method main (line 24) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_07_Baby_Names/Graph.java class Graph (line 6) | public class Graph { method Graph (line 10) | public Graph() { method hasNode (line 15) | public boolean hasNode(String name) { method createNode (line 19) | public GraphNode createNode(String name, int freq) { method getNode (line 30) | private GraphNode getNode(String name) { method getNodes (line 34) | public ArrayList getNodes() { method addEdge (line 38) | public void addEdge(String startName, String endName) { FILE: Java/Ch 17. Hard/Q17_07_Baby_Names/GraphNode.java class GraphNode (line 6) | public class GraphNode { method GraphNode (line 13) | public GraphNode(String nm, int freq) { method getName (line 20) | public String getName() { method getFrequency (line 24) | public int getFrequency() { method addNeighbor (line 28) | public boolean addNeighbor(GraphNode node) { method getNeighbors (line 37) | public ArrayList getNeighbors() { method isVisited (line 41) | public boolean isVisited() { method setIsVisited (line 45) | public void setIsVisited(boolean v) { FILE: Java/Ch 17. Hard/Q17_07_Baby_Names/NameSet.java class NameSet (line 6) | public class NameSet { method NameSet (line 11) | public NameSet(String name, int freq) { method getNames (line 17) | public Set getNames() { method getRootName (line 21) | public String getRootName() { method copyNamesWithFrequency (line 25) | public void copyNamesWithFrequency(Set more, int freq) { method getFrequency (line 30) | public int getFrequency() { method size (line 34) | public int size() { FILE: Java/Ch 17. Hard/Q17_07_Baby_Names/QuestionA.java class QuestionA (line 8) | public class QuestionA { method constructGroups (line 12) | public static HashMap constructGroups(HashMap groups, Strin... method convertToMap (line 47) | public static HashMap convertToMap(HashMap trulyMostPopular(HashMap names) { method connectEdges (line 19) | public static void connectEdges(Graph graph, String[][] synonyms) { method getComponentFrequency (line 29) | public static int getComponentFrequency(GraphNode node) { method getTrueFrequencies (line 43) | public static HashMap getTrueFrequencies(Graph graph) { method trulyMostPopular (line 55) | public static HashMap trulyMostPopular(HashMap { method HtWt (line 6) | public HtWt(int h, int w) { height = h; weight = w; } method compareTo (line 8) | public int compareTo(HtWt second) { method toString (line 16) | public String toString() { method isBefore (line 24) | public boolean isBefore(HtWt other) { FILE: Java/Ch 17. Hard/Q17_08_Circus_Tower/QuestionA.java class QuestionA (line 6) | public class QuestionA { method longestIncreasingSeq (line 7) | public static ArrayList longestIncreasingSeq(ArrayList ite... method max (line 13) | private static ArrayList max(ArrayList seq1, ArrayList solution, HtWt value) { method bestSeqAtIndex (line 33) | private static ArrayList bestSeqAtIndex(ArrayList array, A... method initialize (line 49) | public static ArrayList initialize() { method printList (line 82) | public static void printList(ArrayList list) { method main (line 89) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_08_Circus_Tower/QuestionB.java class QuestionB (line 6) | public class QuestionB { method max (line 9) | private static ArrayList max(ArrayList seq1, ArrayList solution, HtWt value) { method longestIncreasingSeq (line 29) | public static ArrayList longestIncreasingSeq(ArrayList arr... method bestSeqAtIndex (line 43) | private static ArrayList bestSeqAtIndex(ArrayList array, A... method initialize (line 61) | public static ArrayList initialize() { method printList (line 94) | public static void printList(ArrayList list) { method main (line 100) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_08_Circus_Tower/QuestionOld.java class QuestionOld (line 6) | public class QuestionOld { method seqWithMaxLength (line 9) | private static ArrayList seqWithMaxLength(ArrayList seq1, ... method longestIncreasingSubsequence (line 18) | private static void longestIncreasingSubsequence(ArrayList array... method longestIncreasingSeq (line 44) | public static ArrayList longestIncreasingSeq(ArrayList arr... method initialize (line 58) | public static ArrayList initialize() { method printList (line 91) | public static void printList(ArrayList list) { method main (line 97) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_08_Circus_Tower/Tester.java class Tester (line 5) | public class Tester { method randomInt (line 6) | public static int randomInt(int n) { method validate (line 10) | public static boolean validate(ArrayList seq) { method main (line 21) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_09_Kth_Multiple/QuestionA.java class QuestionA (line 6) | public class QuestionA { method allPossibleKFactors (line 8) | public static ArrayList allPossibleKFactors(int k) { method getKthMagicNumber (line 27) | public static int getKthMagicNumber(int k) { method main (line 33) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_09_Kth_Multiple/QuestionB.java class QuestionB (line 6) | public class QuestionB { method removeMin (line 8) | public static int removeMin(Queue q) { method addProducts (line 21) | public static void addProducts(Queue q, int v) { method getKthMagicNumber (line 27) | public static int getKthMagicNumber(int k) { method main (line 41) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_09_Kth_Multiple/QuestionC.java class QuestionC (line 6) | public class QuestionC { method printQueue (line 7) | public static void printQueue(Queue q, int x) { method getKthMagicNumber (line 15) | public static int getKthMagicNumber(int k) { method main (line 44) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_10_Majority_Element/QuestionA.java class QuestionA (line 3) | public class QuestionA { method validate (line 4) | public static boolean validate(int[] array, int majority) { method findMajorityElement (line 15) | public static int findMajorityElement(int[] array) { method main (line 24) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_10_Majority_Element/QuestionB.java class QuestionB (line 3) | public class QuestionB { method getCandidate (line 5) | public static int getCandidate(int[] array) { method validate (line 21) | public static boolean validate(int[] array, int majority) { method findMajorityElement (line 32) | public static int findMajorityElement(int[] array) { method main (line 37) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_11_Word_Distance/LocationPair.java class LocationPair (line 3) | public class LocationPair { method LocationPair (line 6) | public LocationPair(int first, int second) { method setLocations (line 10) | public void setLocations(int first, int second) { method setLocations (line 15) | public void setLocations(LocationPair loc) { method distance (line 19) | public int distance() { method isValid (line 23) | public boolean isValid() { method updateWithMin (line 27) | public void updateWithMin(LocationPair loc) { method toString (line 33) | @Override FILE: Java/Ch 17. Hard/Q17_11_Word_Distance/QuestionA.java class QuestionA (line 5) | public class QuestionA { method findClosest (line 7) | public static LocationPair findClosest(String[] words, String word1, S... method main (line 23) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_11_Word_Distance/QuestionB.java class QuestionB (line 9) | public class QuestionB { method getWordLocations (line 11) | public static HashMapList getWordLocations(String[] w... method findMinDistancePair (line 19) | public static LocationPair findMinDistancePair(ArrayList arra... method findClosest (line 42) | public static LocationPair findClosest(String word1, String word2, Has... method main (line 48) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_11_Word_Distance/Tester.java class Tester (line 9) | public class Tester { method wordAtLocation (line 11) | public static String wordAtLocation(String[] words, int loc) { method searchConfirm (line 19) | public static boolean searchConfirm(String[] words, String word1, Stri... method main (line 41) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_12_BiNode/BiNode.java class BiNode (line 3) | public class BiNode { method BiNode (line 7) | public BiNode(int d) { FILE: Java/Ch 17. Hard/Q17_12_BiNode/QuestionA.java class QuestionA (line 3) | public class QuestionA { class NodePair (line 4) | private static class NodePair { method NodePair (line 8) | public NodePair(BiNode head, BiNode tail) { method convert (line 14) | public static NodePair convert(BiNode root) { method concat (line 33) | public static void concat(BiNode x, BiNode y) { method printLinkedListTree (line 38) | public static void printLinkedListTree(BiNode root) { method createTree (line 48) | public static BiNode createTree() { method printAsTree (line 62) | public static void printAsTree(BiNode root, String spaces) { method main (line 72) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_12_BiNode/QuestionB.java class QuestionB (line 3) | public class QuestionB { method convert (line 5) | public static BiNode convert(BiNode root) { method getTail (line 24) | public static BiNode getTail(BiNode node) { method concat (line 35) | public static void concat(BiNode x, BiNode y) { method printLinkedListTree (line 40) | public static void printLinkedListTree(BiNode root) { method createTree (line 50) | public static BiNode createTree() { method printAsTree (line 64) | public static void printAsTree(BiNode root, String spaces) { method main (line 74) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_12_BiNode/QuestionC.java class QuestionC (line 4) | public class QuestionC { method printAsTree (line 6) | public static void printAsTree(BiNode root, String spaces) { method createTree (line 16) | public static BiNode createTree() { method printLinkedListTree (line 30) | public static void printLinkedListTree(BiNode root) { method convertToCircular (line 40) | public static BiNode convertToCircular(BiNode root) { method convert (line 77) | public static BiNode convert(BiNode root) { method concat (line 84) | public static void concat(BiNode x, BiNode y) { method main (line 89) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_13_ReSpace/ParseResult.java class ParseResult (line 3) | public class ParseResult { method ParseResult (line 6) | public ParseResult(int inv, String p) { method clone (line 11) | public ParseResult clone() { method min (line 15) | public static ParseResult min(ParseResult r1, ParseResult r2) { FILE: Java/Ch 17. Hard/Q17_13_ReSpace/QuestionA.java class QuestionA (line 6) | public class QuestionA { method bestSplit (line 7) | public static String bestSplit(HashSet dictionary, String sent... method split (line 12) | public static ParseResult split(HashSet dictionary, String sen... method clean (line 45) | public static String clean(String str) { method main (line 53) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_13_ReSpace/QuestionB.java class QuestionB (line 6) | public class QuestionB { method bestSplit (line 8) | public static String bestSplit(HashSet dictionary, String sent... method split (line 14) | public static ParseResult split(HashSet dictionary, String sen... method clean (line 49) | public static String clean(String str) { method main (line 57) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_14_Smallest_K/QuestionA.java class QuestionA (line 7) | public class QuestionA { method smallestK (line 9) | public static int[] smallestK(int[] array, int k) { method main (line 25) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_14_Smallest_K/QuestionB.java class QuestionB (line 8) | public class QuestionB { class MaxHeapComparator (line 10) | public static class MaxHeapComparator implements Comparator { method compare (line 11) | public int compare(Integer x, Integer y) { method smallestK (line 16) | public static int[] smallestK(int[] array, int k) { method heapToIntArray (line 26) | public static int[] heapToIntArray(PriorityQueue heap) { method getKMaxHeap (line 35) | public static PriorityQueue getKMaxHeap(int[] array, int k) { method main (line 48) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_14_Smallest_K/QuestionC.java class QuestionC (line 7) | public class QuestionC { method smallestK (line 9) | public static int[] smallestK(int[] array, int k) { method rank (line 27) | public static int rank(int[] array, int rank) { method rank (line 32) | public static int rank(int[] array, int left, int right, int rank) { method partition (line 47) | public static int partition(int[] array, int left, int right, int pivo... method randomIntInRange (line 70) | public static int randomIntInRange(int min, int max) { method swap (line 76) | public static void swap(int[] array, int i, int j) { method max (line 83) | public static int max(int[] array, int left, int right) { method main (line 91) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_14_Smallest_K/QuestionD.java class QuestionD (line 7) | public class QuestionD { class PartitionResult (line 8) | public static class PartitionResult { method PartitionResult (line 11) | public PartitionResult(int left, int middle) { method smallestK (line 17) | public static int[] smallestK(int[] array, int k) { method rank (line 39) | public static int rank(int[] array, int k) { method rank (line 47) | private static int rank(int[] array, int k, int start, int end) { method partition (line 64) | private static PartitionResult partition(int[] array, int start, int e... method randomIntInRange (line 93) | public static int randomIntInRange(int min, int max) { method swap (line 99) | public static void swap(int[] array, int i, int j) { method main (line 105) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_14_Smallest_K/Tester.java class Tester (line 7) | public class Tester { method rankB (line 9) | public static int rankB(int[] array, int rank) { method swap (line 15) | public static void swap(int[] array, int i, int j) { method isUnique (line 21) | public static boolean isUnique(int[] array) { method max (line 32) | public static int max(int[] array, int left, int right) { method randomInt (line 40) | public static int randomInt(int n) { method randomIntInRange (line 44) | public static int randomIntInRange(int min, int max) { method isEqual (line 48) | public static boolean isEqual(int[] array1, int[] array2) { method isEquivalent (line 60) | public static boolean isEquivalent(int[] array1, int[] array2) { method testArray (line 66) | public static boolean testArray(int[] array1) { method main (line 84) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_15_Longest_Word/LengthComparator.java class LengthComparator (line 5) | public class LengthComparator implements Comparator { method compare (line 6) | public int compare(String o1, String o2) { FILE: Java/Ch 17. Hard/Q17_15_Longest_Word/Question.java class Question (line 6) | public class Question { method printLongestWord (line 7) | public static String printLongestWord(String arr[]) { method canBuildWord (line 22) | public static boolean canBuildWord(String str, boolean isOriginalWord,... method main (line 38) | public static void main(String[] args) { method createGiantArray (line 43) | public static String[] createGiantArray() { FILE: Java/Ch 17. Hard/Q17_16_The_Masseuse/QuestionA.java class QuestionA (line 3) | public class QuestionA { method maxMinutes (line 4) | public static int maxMinutes(int[] massages) { method maxMinutes (line 8) | public static int maxMinutes(int[] massages, int index) { method main (line 23) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_16_The_Masseuse/QuestionB.java class QuestionB (line 3) | public class QuestionB { method maxMinutes (line 5) | public static int maxMinutes(int[] massages) { method maxMinutes (line 10) | public static int maxMinutes(int[] massages, int index, int[] memo) { method main (line 23) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_16_The_Masseuse/QuestionC.java class QuestionC (line 3) | public class QuestionC { method maxMinutes (line 4) | public static int maxMinutes(int[] massages) { method main (line 18) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_16_The_Masseuse/QuestionD.java class QuestionD (line 3) | public class QuestionD { method maxMinutes (line 4) | public static int maxMinutes(int[] massages) { method main (line 17) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_16_The_Masseuse/Tester.java class Tester (line 5) | public class Tester { method generateRandomArray (line 6) | public static int[] generateRandomArray(int size) { method sumEveryOther (line 14) | public static int[] sumEveryOther(int[] array) { method main (line 29) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_17_Multi_Search/QuestionA.java class QuestionA (line 8) | public class QuestionA { method isSubstringAtLocation (line 9) | public static boolean isSubstringAtLocation(String big, String small, ... method search (line 18) | public static ArrayList search(String big, String small) { method searchAll (line 28) | public static HashMapList searchAll(String big, Strin... method main (line 37) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_17_Multi_Search/QuestionB.java class QuestionB (line 8) | public class QuestionB { method subtractValue (line 9) | public static void subtractValue(ArrayList locations, int del... method createTrieFromString (line 16) | public static Trie createTrieFromString(String s) { method searchAll (line 25) | public static HashMapList searchAll(String big, Strin... method main (line 42) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_17_Multi_Search/QuestionC.java class QuestionC (line 7) | public class QuestionC { method createTreeFromStrings (line 8) | public static Trie createTreeFromStrings(String[] smalls, int maxSize) { method findStringsAtLoc (line 18) | public static ArrayList findStringsAtLoc(TrieNode root, String... method insertIntoHashMap (line 33) | public static void insertIntoHashMap(ArrayList strings, HashMa... method searchAll (line 39) | public static HashMapList searchAll(String big, Strin... method main (line 51) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_17_Multi_Search/Trie.java class Trie (line 5) | public class Trie { method search (line 8) | public ArrayList search(String s) { method insertString (line 12) | public void insertString(String str, int location) { method getRoot (line 16) | public TrieNode getRoot() { FILE: Java/Ch 17. Hard/Q17_17_Multi_Search/TrieNode.java class TrieNode (line 6) | public class TrieNode { method TrieNode (line 10) | public TrieNode() { method insertString (line 16) | public void insertString(String s, int index) { method search (line 35) | public ArrayList search(String s) { method terminates (line 48) | public boolean terminates() { method getChild (line 52) | public TrieNode getChild(char c) { FILE: Java/Ch 17. Hard/Q17_18_Shortest_Supersequence/HeapNode.java class HeapNode (line 3) | public class HeapNode implements Comparable { method HeapNode (line 7) | public HeapNode(int location, int list) { method compareTo (line 12) | @Override FILE: Java/Ch 17. Hard/Q17_18_Shortest_Supersequence/QuestionA.java class QuestionA (line 3) | public class QuestionA { method findNextInstance (line 5) | public static int findNextInstance(int[] array, int element, int index) { method findClosure (line 17) | public static int findClosure(int[] bigArray, int[] smallArray, int in... method shortestSupersequence (line 29) | public static Range shortestSupersequence(int[] bigArray, int[] smallA... method main (line 46) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_18_Shortest_Supersequence/QuestionB.java class QuestionB (line 3) | public class QuestionB { method getNextElement (line 6) | public static int[] getNextElement(int[] bigArray, int value) { method getNextElementsMulti (line 19) | public static int[][] getNextElementsMulti(int[] big, int[] small) { method getClosureForIndex (line 29) | public static int getClosureForIndex(int[][] nextElements, int index) { method getClosures (line 41) | public static int[] getClosures(int[][] nextElements) { method getShortestClosure (line 50) | public static Range getShortestClosure(int[] closures) { method shortestSupersequence (line 69) | public static Range shortestSupersequence(int[] big, int[] small) { method main (line 75) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_18_Shortest_Supersequence/QuestionC.java class QuestionC (line 3) | public class QuestionC { method shortestSupersequence (line 5) | public static Range shortestSupersequence(int[] big, int[] small) { method getClosures (line 11) | public static int[] getClosures(int[] big, int[] small) { method sweepForClosure (line 20) | public static void sweepForClosure(int[] big, int[] closures, int valu... method getShortestClosure (line 33) | public static Range getShortestClosure(int[] closures) { method main (line 49) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_18_Shortest_Supersequence/QuestionD.java class QuestionD (line 12) | public class QuestionD { method getShortestClosure (line 14) | public static Range getShortestClosure(ArrayList> lists) { method getLocationsForElements (line 61) | public static ArrayList> getLocationsForElements(int[] ... method shortestSupersequence (line 82) | public static Range shortestSupersequence(int[] big, int[] small) { method main (line 88) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_18_Shortest_Supersequence/QuestionE.java class QuestionE (line 5) | public class QuestionE { class CountedLookup (line 10) | public static class CountedLookup { method CountedLookup (line 13) | public CountedLookup(int[] array) { method contains (line 19) | public boolean contains(int v) { method incrementIfFound (line 23) | public void incrementIfFound(int v) { method decrementIfFound (line 31) | public void decrementIfFound(int v) { method areAllFulfilled (line 39) | public boolean areAllFulfilled() { method shortestSupersequence (line 45) | public static Range shortestSupersequence(int[] big, int[] small) { method findClosure (line 69) | public static int findClosure(int[] big, int startIndex, CountedLookup... method main (line 80) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_18_Shortest_Supersequence/Range.java class Range (line 3) | public class Range { method Range (line 6) | public Range(int s, int e) { method length (line 11) | public int length() { method hashCode (line 15) | @Override method equals (line 24) | @Override method toString (line 40) | @Override method shorterThan (line 45) | public boolean shorterThan(Range other) { method getStart (line 49) | public int getStart() { method getEnd (line 53) | public int getEnd() { FILE: Java/Ch 17. Hard/Q17_18_Shortest_Supersequence/Tester.java class Tester (line 5) | public class Tester { method equivalent (line 6) | public static boolean equivalent(Range[] ranges) { method main (line 26) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_19_Missing_Two/QuestionA.java class QuestionA (line 5) | public class QuestionA { method productToN (line 7) | public static BigInteger productToN(int n) { method missingOne (line 15) | public static int missingOne(int[] array) { method main (line 28) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_19_Missing_Two/QuestionB.java class QuestionB (line 3) | public class QuestionB { method missingOne (line 4) | public static int missingOne(int[] array) { method main (line 14) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_19_Missing_Two/QuestionC.java class QuestionC (line 3) | public class QuestionC { method squareSumToN (line 4) | public static int squareSumToN(int n, int power) { method solveEquation (line 12) | public static int[] solveEquation(int r1, int r2) { method missingTwo (line 40) | public static int[] missingTwo(int[] array) { method main (line 53) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_20_Continuous_Median/MaxHeapComparator.java class MaxHeapComparator (line 5) | public class MaxHeapComparator implements Comparator{ method compare (line 7) | @Override FILE: Java/Ch 17. Hard/Q17_20_Continuous_Median/MinHeapComparator.java class MinHeapComparator (line 5) | public class MinHeapComparator implements Comparator{ method compare (line 7) | @Override FILE: Java/Ch 17. Hard/Q17_20_Continuous_Median/Question.java class Question (line 7) | public class Question { method addNewNumber (line 13) | public static void addNewNumber(int randomNumber) { method getMedian (line 35) | public static double getMedian() { method addNewNumberAndPrintMedian (line 48) | public static void addNewNumberAndPrintMedian(int randomNumber) { method printMinHeapAndMaxHeap (line 55) | public static void printMinHeapAndMaxHeap(){ method main (line 73) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_21_Volume_of_Histogram/HistogramData.java class HistogramData (line 3) | public class HistogramData { method HistogramData (line 9) | public HistogramData(int v) { method getHeight (line 13) | public int getHeight() { return height; } method getLeftMaxIndex (line 14) | public int getLeftMaxIndex() { return leftMaxIndex; } method setLeftMaxIndex (line 15) | public void setLeftMaxIndex(int idx) { leftMaxIndex = idx; } method getRightMaxIndex (line 16) | public int getRightMaxIndex() { return rightMaxIndex; } method setRightMaxIndex (line 17) | public void setRightMaxIndex(int idx) { rightMaxIndex = idx; } FILE: Java/Ch 17. Hard/Q17_21_Volume_of_Histogram/QuestionA.java class QuestionA (line 3) | public class QuestionA { method findIndexOfMax (line 5) | public static int findIndexOfMax(int[] histogram, int start, int end) { method borderedVolume (line 15) | public static int borderedVolume(int[] histogram, int start, int end) { method subgraphVolume (line 26) | public static int subgraphVolume(int[] histogram, int start, int end, ... method computeHistogramVolume (line 42) | public static int computeHistogramVolume(int[] histogram) { method main (line 54) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_21_Volume_of_Histogram/QuestionB.java class QuestionB (line 3) | public class QuestionB { method borderedVolume (line 4) | public static int borderedVolume(HistogramData[] data, int start, int ... method subgraphVolume (line 15) | public static int subgraphVolume(HistogramData[] histogram, int start,... method createHistogramData (line 31) | public static HistogramData[] createHistogramData(int[] histo) { method computeHistogramVolume (line 58) | public static int computeHistogramVolume(int[] histogram) { method main (line 72) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_21_Volume_of_Histogram/QuestionC.java class QuestionC (line 3) | public class QuestionC { method computeHistogramVolume (line 12) | public static int computeHistogramVolume(int[] histo) { method main (line 39) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_21_Volume_of_Histogram/Tester.java class Tester (line 3) | public class Tester { method main (line 8) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_22_Word_Transformer/BFSData.java class BFSData (line 7) | public class BFSData { method BFSData (line 11) | public BFSData(String root) { method isFinished (line 17) | public boolean isFinished() { FILE: Java/Ch 17. Hard/Q17_22_Word_Transformer/PathNode.java class PathNode (line 5) | public class PathNode { method PathNode (line 8) | public PathNode(String word, PathNode previous) { method getWord (line 13) | public String getWord() { method collapse (line 18) | public LinkedList collapse(boolean startsWithRoot) { FILE: Java/Ch 17. Hard/Q17_22_Word_Transformer/QuestionA.java class QuestionA (line 12) | public class QuestionA { method wordsOneAway (line 14) | public static ArrayList wordsOneAway(String word) { method transform (line 25) | public static LinkedList transform(HashSet visited, St... method transform (line 48) | public static LinkedList transform(String start, String stop, ... method setupDictionary (line 54) | public static HashSet setupDictionary(String[] words) { method main (line 62) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_22_Word_Transformer/QuestionB.java class QuestionB (line 10) | public class QuestionB { method transform (line 13) | public static LinkedList transform(String start, String stop, ... method transform (line 20) | public static LinkedList transform(HashSet visited, St... method createWildcardToWordMap (line 44) | public static HashMapList createWildcardToWordMap(Stri... method getWildcardRoots (line 56) | public static ArrayList getWildcardRoots(String w) { method getValidLinkedWords (line 68) | public static ArrayList getValidLinkedWords(String word, HashM... method main (line 82) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_22_Word_Transformer/QuestionC.java class QuestionC (line 9) | public class QuestionC { method transform (line 11) | public static LinkedList transform(String startWord, String st... method searchLevel (line 35) | public static String searchLevel(HashMapList wildcardT... method mergePaths (line 62) | public static LinkedList mergePaths(BFSData bfs1, BFSData bfs2... method getWildcardRoots (line 72) | public static ArrayList getWildcardRoots(String word) { method getWildcardToWordList (line 81) | public static HashMapList getWildcardToWordList(String... method getValidLinkedWords (line 92) | public static ArrayList getValidLinkedWords(String word, HashM... method main (line 106) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_22_Word_Transformer/Tester.java class Tester (line 5) | public class Tester { method printList (line 7) | public static void printList(LinkedList list) { method main (line 15) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_23_Max_Black_Square/Question.java class Question (line 5) | public class Question { method findSquareWithSize (line 6) | public static Subsquare findSquareWithSize(int[][] matrix, int squareS... method findSquare (line 21) | public static Subsquare findSquare(int[][] matrix){ method isSquare (line 38) | private static boolean isSquare(int[][] matrix, int row, int col, int ... method main (line 61) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_23_Max_Black_Square/QuestionEff.java class QuestionEff (line 5) | public class QuestionEff { method findSquareWithSize (line 6) | public static Subsquare findSquareWithSize(SquareCell[][] processed, i... method findSquare (line 21) | public static Subsquare findSquare(int[][] matrix){ method isSquare (line 40) | private static boolean isSquare(SquareCell[][] matrix, int row, int co... method processSquare (line 59) | public static SquareCell[][] processSquare(int[][] matrix) { method main (line 84) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_23_Max_Black_Square/SquareCell.java class SquareCell (line 3) | public class SquareCell { method SquareCell (line 6) | public SquareCell(int right, int below) { method setZerosRight (line 11) | public void setZerosRight(int right) { method setZerosBelow (line 15) | public void setZerosBelow(int below) { FILE: Java/Ch 17. Hard/Q17_23_Max_Black_Square/Subsquare.java class Subsquare (line 3) | public class Subsquare { method Subsquare (line 5) | public Subsquare(int r, int c, int sz) { method print (line 11) | public void print() { FILE: Java/Ch 17. Hard/Q17_24_Max_Submatrix/QuestionA.java class QuestionA (line 5) | public class QuestionA { method getMaxMatrix (line 6) | public static SubMatrix getMaxMatrix(int[][] matrix) { method sum (line 25) | private static int sum(int[][] matrix, int row1, int col1, int row2, i... method main (line 35) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_24_Max_Submatrix/QuestionB.java class QuestionB (line 5) | public class QuestionB { method getMaxMatrix (line 6) | public static SubMatrix getMaxMatrix(int[][] matrix) { method precomputeSums (line 27) | private static int[][] precomputeSums(int[][] matrix) { method sum (line 40) | private static int sum(int[][] sumThrough, int r1, int c1, int r2, int... method main (line 48) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_24_Max_Submatrix/QuestionC.java class QuestionC (line 5) | public class QuestionC { method getMaxMatrix (line 6) | public static SubMatrix getMaxMatrix(int[][] matrix) { method maxSubArray (line 30) | public static Range maxSubArray(int[] array, int N) { method main (line 51) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_24_Max_Submatrix/Range.java class Range (line 3) | public class Range { method Range (line 5) | public Range(int start, int end, int sum) { FILE: Java/Ch 17. Hard/Q17_24_Max_Submatrix/SubMatrix.java class SubMatrix (line 3) | public class SubMatrix { method SubMatrix (line 5) | public SubMatrix(int r1, int c1, int r2, int c2, int sm) { method getSum (line 13) | public int getSum() { method toString (line 17) | @Override FILE: Java/Ch 17. Hard/Q17_24_Max_Submatrix/Tester.java class Tester (line 5) | public class Tester { method main (line 7) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_25_Word_Rectangle/Question.java class Question (line 7) | public class Question { method Question (line 12) | public Question(String[] list) { method maxRectangle (line 24) | public Rectangle maxRectangle() { method makeRectangle (line 55) | private Rectangle makeRectangle(int length, int height) { method makePartialRectangle (line 77) | private Rectangle makePartialRectangle(int l, int h, Rectangle rectang... method main (line 109) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_25_Word_Rectangle/Rectangle.java class Rectangle (line 6) | public class Rectangle { method Rectangle (line 13) | public Rectangle(int len) { method Rectangle (line 22) | public Rectangle(int length, int height, char[][] letters) { method getLetter (line 30) | public char getLetter (int i, int j) { method getColumn (line 34) | public String getColumn(int i) { method isComplete (line 42) | public boolean isComplete(int l, int h, WordGroup groupList) { method isPartialOK (line 57) | public boolean isPartialOK(int l, Trie trie) { method append (line 75) | public Rectangle append(String s) { method print (line 91) | public void print() { FILE: Java/Ch 17. Hard/Q17_25_Word_Rectangle/WordGroup.java class WordGroup (line 7) | public class WordGroup { method WordGroup (line 11) | public WordGroup() { method containsWord (line 15) | public boolean containsWord(String s) { method addWord (line 19) | public void addWord (String s) { method length (line 24) | public int length() { method getWord (line 28) | public String getWord(int i) { method getWords (line 32) | public ArrayList getWords(){ method createWordGroups (line 36) | public static WordGroup[] createWordGroups(String[] list) { FILE: Java/Ch 17. Hard/Q17_26_Sparse_Similarity/DocPair.java class DocPair (line 3) | public class DocPair { method DocPair (line 7) | public DocPair(int d1, int d2) { method equals (line 12) | @Override method hashCode (line 21) | @Override FILE: Java/Ch 17. Hard/Q17_26_Sparse_Similarity/Document.java class Document (line 5) | public class Document { method Document (line 9) | public Document(int id, ArrayList w) { method getWords (line 14) | public ArrayList getWords() { method getId (line 18) | public int getId() { method size (line 22) | public int size() { FILE: Java/Ch 17. Hard/Q17_26_Sparse_Similarity/QuestionA.java class QuestionA (line 12) | public class QuestionA { method computeSimilarities (line 13) | public static HashMap computeSimilarities(HashMap computeSimilarities(ArrayList removeDups(int[] array) { method main (line 63) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_26_Sparse_Similarity/QuestionB.java class QuestionB (line 12) | public class QuestionB { method computeSimilarities (line 13) | public static HashMap computeSimilarities(HashMap groupWords(HashMap computeIntersections(HashMapLis... method increment (line 54) | public static void increment(HashMap similarities, in... method adjustToSimilarities (line 64) | public static void adjustToSimilarities(HashMap doc... method main (line 75) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_26_Sparse_Similarity/QuestionC.java class QuestionC (line 11) | public class QuestionC { class Element (line 12) | public static class Element implements Comparable { method Element (line 15) | public Element(int w, int d) { method compareTo (line 20) | public int compareTo(Element e) { method computeSimilarities (line 28) | public static HashMap computeSimilarities(HashMap sortWords(HashMap ... method increment (line 49) | public static void increment(HashMap similarities, in... method computeIntersections (line 59) | public static HashMap computeIntersections(ArrayList<... method adjustToSimilarities (line 77) | public static void adjustToSimilarities(HashMap doc... method main (line 88) | public static void main(String[] args) { FILE: Java/Ch 17. Hard/Q17_26_Sparse_Similarity/Tester.java class Tester (line 8) | public class Tester { method removeDups (line 9) | public static ArrayList removeDups(int[] array) { method isEqual (line 19) | public static boolean isEqual(HashMap one, HashMap similarities) { method addTo (line 45) | public static void addTo(HashMap documents, int id,... method main (line 51) | public static void main(String[] args) { FILE: Java/CtCILibrary/CtCILibrary/AssortedMethods.java class AssortedMethods (line 6) | public class AssortedMethods { method randomInt (line 7) | public static int randomInt(int n) { method randomIntInRange (line 11) | public static int randomIntInRange(int min, int max) { method randomBoolean (line 15) | public static boolean randomBoolean() { method randomBoolean (line 19) | public static boolean randomBoolean(int percentTrue) { method randomBooleanMatrix (line 23) | public static boolean[][] randomBooleanMatrix(int M, int N, int percen... method randomMatrix (line 33) | public static int[][] randomMatrix(int M, int N, int min, int max) { method randomArray (line 44) | public static int[] randomArray(int N, int min, int max) { method randomLinkedList (line 52) | public static LinkedListNode randomLinkedList(int N, int min, int max) { method linkedListWithValue (line 65) | public static LinkedListNode linkedListWithValue(int N, int value) { method createLinkedListFromArray (line 76) | public static LinkedListNode createLinkedListFromArray(int[] vals) { method arrayToString (line 85) | public static String arrayToString(int[] array) { method arrayToString (line 90) | public static String arrayToString(int[] array, int start, int end) { method stringArrayToString (line 99) | public static String stringArrayToString(String[] array) { method toFullBinaryString (line 107) | public static String toFullBinaryString(int a) { method toBaseNString (line 117) | public static String toBaseNString(int a, int base) { method printMatrix (line 131) | public static void printMatrix(int[][] matrix) { method printMatrix (line 149) | public static void printMatrix(boolean[][] matrix) { method printIntArray (line 162) | public static void printIntArray(int[] array) { method charArrayToString (line 169) | public static String charArrayToString(char[] array) { method listOfPointsToString (line 180) | public static String listOfPointsToString(ArrayList list) { method randomBST (line 188) | public static TreeNode randomBST(int N, int min, int max) { method createTreeFromArray (line 198) | public static TreeNode createTreeFromArray(int[] array) { method getLongTextBlob (line 228) | public static String getLongTextBlob() { method getLongTextBlobAsStringList (line 237) | public static String[] getLongTextBlobAsStringList() { method getTrieDictionary (line 241) | public static Trie getTrieDictionary() { method getWordListAsHashSet (line 245) | public static HashSet getWordListAsHashSet() { method getLongSampleText (line 254) | public static String getLongSampleText(boolean forceLower) { method getListOfWords (line 365) | public static String[] getListOfWords() { FILE: Java/CtCILibrary/CtCILibrary/BTreePrinter.java class BTreePrinter (line 7) | public class BTreePrinter { method printNode (line 9) | public static > void printNode(TreeNode root) { method printNodeInternal (line 15) | private static > void printNodeInternal(List> int maxLevel(TreeNode node) { method isAllElementsNull (line 83) | private static boolean isAllElementsNull(List list) { FILE: Java/CtCILibrary/CtCILibrary/BitVector.java class BitVector (line 3) | public class BitVector { method BitVector (line 8) | public BitVector(int length) { method length (line 17) | public int length() { method get (line 21) | public boolean get(int i) { method print (line 32) | public void print() { method set (line 45) | public void set(int i, boolean flag) { FILE: Java/CtCILibrary/CtCILibrary/HashMapList.java class HashMapList (line 7) | public class HashMapList { method put (line 11) | public void put(T key, E item) { method put (line 19) | public void put(T key, ArrayList items) { method get (line 24) | public ArrayList get(T key) { method containsKey (line 29) | public boolean containsKey(T key) { method containsKeyValue (line 34) | public boolean containsKeyValue(T key, E value) { method keySet (line 41) | public Set keySet() { method toString (line 45) | @Override FILE: Java/CtCILibrary/CtCILibrary/LinkedListNode.java class LinkedListNode (line 3) | public class LinkedListNode { method LinkedListNode (line 8) | public LinkedListNode(int d, LinkedListNode n, LinkedListNode p) { method LinkedListNode (line 14) | public LinkedListNode(int d) { method LinkedListNode (line 18) | public LinkedListNode() { } method setNext (line 20) | public void setNext(LinkedListNode n) { method setPrevious (line 30) | public void setPrevious(LinkedListNode p) { method printForward (line 37) | public String printForward() { method clone (line 45) | public LinkedListNode clone() { FILE: Java/CtCILibrary/CtCILibrary/TreeNode.java class TreeNode (line 6) | public class TreeNode { method TreeNode (line 13) | public TreeNode(int d) { method setLeftChild (line 18) | private void setLeftChild(TreeNode left) { method setRightChild (line 25) | private void setRightChild(TreeNode right) { method insertInOrder (line 32) | public void insertInOrder(int d) { method size (line 49) | public int size() { method isBST (line 53) | public boolean isBST() { method height (line 69) | public int height() { method find (line 75) | public TreeNode find(int d) { method createMinimalBST (line 86) | private static TreeNode createMinimalBST(int arr[], int start, int end){ method createMinimalBST (line 97) | public static TreeNode createMinimalBST(int[] array) { method print (line 101) | public void print() { FILE: Java/CtCILibrary/CtCILibrary/Trie.java class Trie (line 9) | public class Trie method Trie (line 15) | public Trie(ArrayList list) { method Trie (line 24) | public Trie(String[] list) { method contains (line 34) | public boolean contains(String prefix, boolean exact) { method contains (line 46) | public boolean contains(String prefix) { method getRoot (line 50) | public TrieNode getRoot() { FILE: Java/CtCILibrary/CtCILibrary/TrieNode.java class TrieNode (line 8) | public class TrieNode { method TrieNode (line 18) | public TrieNode() { method TrieNode (line 26) | public TrieNode(char character) { method getChar (line 32) | public char getChar() { method addWord (line 38) | public void addWord(String word) { method getChild (line 61) | public TrieNode getChild(char c) { method terminates (line 66) | public boolean terminates() { method setTerminates (line 71) | public void setTerminates(boolean t) { FILE: Java/Introduction/Big_O/Ex_01.java class Ex_01 (line 3) | public class Ex_01 { method sum (line 4) | public static int sum(int n) { method main (line 11) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_02.java class Ex_02 (line 3) | public class Ex_02 { method pairSum (line 4) | public static int pairSum(int a, int b) { method pairSumSequence (line 8) | public static int pairSumSequence(int n) { method main (line 16) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_03.java class Ex_03 (line 3) | public class Ex_03 { method minAndMax1 (line 4) | public static void minAndMax1(int[] array) { method minAndMax2 (line 14) | public static void minAndMax2(int[] array) { method main (line 26) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_04.java class Ex_04 (line 3) | public class Ex_04 { method foo (line 4) | public static void foo(int[] arrA, int[] arrB) { method bar (line 13) | public static void bar(int[] arrA, int[] arrB) { method main (line 21) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_05.java class Ex_05 (line 3) | public class Ex_05 { method f (line 4) | public static int f(int n) { method main (line 11) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_06.java class Ex_06 (line 3) | public class Ex_06 { method foo (line 4) | public static void foo(int[] array) { method main (line 16) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_07.java class Ex_07 (line 3) | public class Ex_07 { method printPairs (line 4) | public static void printPairs(int[] array) { method main (line 12) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_08.java class Ex_08 (line 3) | public class Ex_08 { method printUnorderedPairs (line 4) | public static void printUnorderedPairs(int[] array) { method main (line 12) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_09.java class Ex_09 (line 3) | public class Ex_09 { method printUnorderedPairs (line 4) | public static void printUnorderedPairs(int[] arrayA, int[] arrayB) { method main (line 14) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_10.java class Ex_10 (line 3) | public class Ex_10 { method printUnorderedPairs (line 4) | public static void printUnorderedPairs(int[] arrayA, int[] arrayB) { method main (line 14) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_11.java class Ex_11 (line 3) | public class Ex_11 { method reverse (line 4) | public static void reverse(int[] array) { method main (line 13) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_14.java class Ex_14 (line 3) | public class Ex_14 { method isPrime (line 4) | public static boolean isPrime(int n) { method main (line 13) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_15.java class Ex_15 (line 3) | public class Ex_15 { method factorial (line 4) | public static int factorial(int n) { method main (line 14) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_16.java class Ex_16 (line 3) | public class Ex_16 { method permutation (line 4) | public static void permutation(String str) { method permutation (line 8) | public static void permutation(String str, String prefix) { method main (line 19) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_17.java class Ex_17 (line 3) | public class Ex_17 { method fib (line 4) | public static int fib(int n) { method main (line 11) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_18.java class Ex_18 (line 3) | public class Ex_18 { method allFib (line 4) | public static void allFib(int n) { method fib (line 10) | public static int fib(int n) { method main (line 16) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_19.java class Ex_19 (line 3) | public class Ex_19 { method allFib (line 4) | public static void allFib(int n) { method fib (line 11) | public static int fib(int n, int[] memo) { method main (line 21) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Ex_20.java class Ex_20 (line 3) | public class Ex_20 { method powersOf2 (line 4) | public static int powersOf2(int n) { method main (line 16) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_01.java class Q_01 (line 3) | public class Q_01 { method product (line 5) | public static int product(int a, int b) { method main (line 13) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_02.java class Q_02 (line 3) | public class Q_02 { method power (line 5) | public static int power(int a, int b) { method main (line 15) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_03.java class Q_03 (line 3) | public class Q_03 { method mod (line 5) | public static int mod(int a, int b) { method main (line 13) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_04.java class Q_04 (line 3) | public class Q_04 { method div (line 5) | public static int div(int a, int b) { method main (line 15) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_05.java class Q_05 (line 3) | public class Q_05 { method sqrt (line 5) | public static int sqrt(int n) { method sqrt_helper (line 9) | public static int sqrt_helper(int n, int min, int max) { method main (line 25) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_06.java class Q_06 (line 3) | public class Q_06 { method sqrt (line 5) | public static int sqrt(int n) { method main (line 14) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_09.java class Q_09 (line 3) | public class Q_09 { method copyArray (line 5) | public static int[] copyArray(int[] array) { method appendToNew (line 13) | public static int[] appendToNew(int[] array, int value) { method main (line 25) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_10.java class Q_10 (line 3) | public class Q_10 { method sumDigits (line 5) | public static int sumDigits(int n) { method main (line 14) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_11.java class Q_11 (line 3) | public class Q_11 { method printSortedStrings (line 7) | public static void printSortedStrings(int remaining) { method printSortedStrings (line 11) | public static void printSortedStrings(int remaining, String prefix) { method isInOrder (line 22) | public static boolean isInOrder(String s) { method ithLetter (line 33) | public static char ithLetter(int i) { method main (line 37) | public static void main(String[] args) { FILE: Java/Introduction/Big_O/Q_12.java class Q_12 (line 3) | public class Q_12 { method binarySearch (line 5) | public static int binarySearch(int[] a, int x) { method mergesort (line 23) | public static void mergesort(int[] array) { method mergesort (line 28) | public static void mergesort(int[] array, int[] helper, int low, int h... method merge (line 37) | public static void merge(int[] array, int[] helper, int low, int middl... method intersection (line 69) | public static int intersection(int[] a, int[] b) { method main (line 82) | public static void main(String[] args) { FILE: Java/Introduction/CompareBinaryToHex/CompareBinaryToHex.java class CompareBinaryToHex (line 3) | public class CompareBinaryToHex { method digitToValue (line 5) | public static int digitToValue(char c) { method convertFromBase (line 16) | public static int convertFromBase(String number, int base) { method compareBinToHex (line 30) | public static boolean compareBinToHex(String binary, String hex) { method main (line 39) | public static void main(String[] args) { FILE: Java/Introduction/SwapMinMax/SwapMinMax.java class SwapMinMax (line 5) | public class SwapMinMax { method getMinIndex (line 7) | public static int getMinIndex(int[] array) { method getMaxIndex (line 17) | public static int getMaxIndex(int[] array) { method swap (line 27) | public static void swap(int[] array, int m, int n) { method swapMinMaxBetter (line 33) | public static void swapMinMaxBetter(int[] array) { method swapMinMax (line 39) | public static void swapMinMax(int[] array) { method main (line 59) | public static void main(String[] args) {