SHARE
TWEET

15s2

a guest Dec 8th, 2019 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. COMP1927 15s2 Exam Question 6 (Weighted DiGraphs)
  2.  
  3. A. 2.5 (A B G M N P Q V) (checked 1)
  4.  
  5.  
  6. B. 3.1 (V Q K J H G F A) (checked 1)
  7.  
  8.  
  9. C. R is not visitable from any other node
  10.  
  11. COMP1927 15s2 Exam Question 7 (Mergesort)
  12.  
  13. A.
  14. o s r t i n g i a s e w o s e m
  15.  
  16. o r s t g i i n a e w s e m o s
  17.  
  18. g i i n o r s t a e e m o s s w
  19.  
  20. a e e g i i m n o o r s s s t w
  21.  
  22.  
  23. B. Dictates the end of each partition when merging from the bottom up. i + 2*m - 1 can overflow on the last outer loop pass when log_2(n) is not a whole number, so we take min with hi, the max array index
  24.  
  25. COMP1927 15s2 Exam Question 8 (Hash Table)
  26.  
  27. A. avg length = 100/11 = 9 (approx)
  28.  
  29.  
  30. B. 4 (including 42)
  31.  
  32.  
  33. C. 9
  34.  
  35.  
  36. D. ceil(N/11) where N is the total number of items inserted
  37.  
  38. E. 0 (ie an empty list, no items to compare)
  39.  
  40. Confusing question, but if the N items are the same sequence as D, then floor(N/11)
  41.  
  42. F. for (int i = 0; i < 100*11; i *= 11) {
  43.         insert(h(i), table);
  44.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top