In java Implement a STACK of floats using as a linked list and as an array. You
Question:
In java Implement a STACK of floats using as a linked list and as an array.
You should ask the user what operation to do (Push/Pop/Peek/Clear/etc) and if needed the parameter needed then perform that operation.
b) compare the following pairs of functions and say (True /false ) whether f(n) is O (g(n)) for each of the following:
pair 1: f(n)=100,000,000 g(n)=1
pair 2: f(n)=100,000,000 g(n)=n
pair 3: f(n)=100,000,000 g(n)=n2
pair 4: f(n)=n g(n)=100,000,000
pair 5: f(n)=50 n g(n)=51 n
pair 6: f(n)=50 n g(n)=log(n)
pair 7: f(n)=n log(n) g(n)=n2
pair 8: f(n)=n2 log(n) g(n)=n3
pair 9: f(n)= g(n)=log(n)
pair 10: f(n)=n2 log2 (n) g(n)=n3