JAVA
21. What is the line of code to declare and create a generic array. (case and spelling matter- name the array, array) Use T for the generic placeholder.
22What is the order of the following growth function? t(n)= 5nlogn + 20n – 4
O(lg n) |
O(n^2) |
O(1) |
O(nlg (n)
23. The following code segment has ______ time complexity? for(int i = 0; i < n; i++){ for(int j = 0; j < n: j=j*2){ int val = (j*i); System.out.println(val) } }
|
Expert Answer
22.O(n log n)
23.O(n log n)
24.None of the above
25.protected