Comp. Science Programming and Technical Category

Consider the following functions: f(n)= 3 n ? n ; g(n) = 3 n ? n n log 3 ; h(n) = n! Which of the following is true?

1. h(n) is O (f(n))

2. h(n) is O (g(n))

3. f(n) is O (g(n))

4. g(n) is not O (f(n))

Read Solution (Total 0)

Comp. Science Other Question

In a graph G there are 2n first 3 bits are similar. What are the number of connected components?

1. 1

2. 3

3. 8

4. 2n-3
Consider the following program

n = b1b2b3….bm

int n, rev;

rev = 0;

while (n > 0) {

rev = rev * 10 + n %10;

n = n/10;

}