Assignment: #assessment0 | Due: 12/04/2017 | Points: 3 |
Record "stack" or "queue" for each of the following.
line printer spooler LIFO reverse the digits of a number FIFO buffered I/O
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.
Assume transactions take on average 10 milli-seconds to post.
Record the worst-case processing time (in ms) for
O(log_{2} n), O(n), O(n log_{2} n), O(n^2)
when eight (n = 8) transactions are posted.
Write pseudo-Java code that instantiates a 1024-element array of class Object elements such that none of the elements are null pointers.
Given the array {1,4,5,6,8,12,13,16} record the comparisons that would be evaluated when doing binary_search(3).
Record the swaps that occur when the array {5,2,8,4,9,0} is sorted in ascending order using Bubble Sort.