No Late Submissions Accepted
Assignment: #assessment0 Due: 04/30/2017 Points: 3

  1. Record "stack" or "queue" for each of the following.

    	line printer spooler
    	LIFO
    	reverse the digits of a number
    	FIFO
    	buffered I/O
    
  2. Explain why accessing the nth element of an array can be done in constant time O(1) compared to O(n) time for a linked-list.

  3. Assume transactions take on average 10 milli-seconds to post. Record the worst-case processing time (in ms) for O(log2 n), O(n), O(n log2 n), O(n^2) when eight (n = 8) transactions are posted.

  4. Write pseudo-Java code that instantiates a 1024-element array of class Object elements such that none of the elements are null pointers.

  5. Given the array   {1,4,5,6,8,12,13,16}   record the comparisons that would be evaluated when doing binary_search(3).

  6. Record the swaps that occur when the array   {5,2,8,4,9,0}   is sorted in ascending order using Bubble Sort.