Courses‎ > ‎AP Computer Science 2‎ > ‎konstantinovich‎ > ‎

2018-04-10

posted Apr 9, 2018, 8:01 PM by Konstantinovich Samuel   [ updated Apr 10, 2018, 10:19 AM ]
St. Joseph's Competition interest form:
Due to limited number of teams allowed, this is a far more selective competition, so only apply if you are serious! 



MyLinkedList  : stores <Integer>
    All of the methods must work.
    I will test the required methods thoroughly (as per the tester class I posted, however I will test indexOf which was not included in that test.)

MyLinkedListImproved 
  -Stores a generic <T>
  -must be iterable
  -I will not test remove
  -I will only use add(Value)

New Stuff:  
MyLinkedListImproved
 -must have 2 more methods:
   public int max() -> return the index of the largest value, or -1 if the list is empty
   public int min() -> return the index of the largest value, or -1 if the list is empty


How do you find the max in linear time?
How do you compare values (remember the type is T)
Comments