JAVA PROBLEM...
Problem: Consider the following function classes ordered byproper inclusion:
(a) π(1000)
(b) π(πππ(πππ(π)))
(c) π(πππ(π))
(d) π([πππ(π)] 4 )
(e) π(2π + 1)
(f) π(π πππ (π))
(g) π(π 2 πππ (π))
(h) π(π 4 )
(i) π(3 π )
(j) π(π π)
(k) π΅πππ’π : πππ‘ ππ πππ¦ π(π(π)) π€βπππ π(π) ππ ππππ‘βπππ‘ππππππ₯ππππ π πππ ππ π.
For each big-O class C as above, write a method taking apositive integer k that prints f(k) dots on the console where f(n)is of class C, but f(n) is not in any class appearing listed beforeC. For example, log(n) is in the class listed under (c), but it isneither in the one listed under (b) nor listed under (a). You arelimited to a sub-language of Java. You can ONLY use fixed incrementoperators, variable declarations, assignment operators, methodcalls, Boolean operators, multiplication and division by constants,and control-flow structures. Justify your choice. Avoid librarycalls, except to print a dot on the console.
JAVA PROBLEM... Problem: Consider the following function classes ordered by proper inclusion: (a) 𝑂(1000) (b) 𝑂(𝑙𝑜𝑔(𝑙𝑜𝑔(
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am