Skip to main content
added 28 characters in body; edited tags
Source Link
xskxzr
  • 7.6k
  • 5
  • 23
  • 47

I had quiz last week and it says  : suppose algorithms A1$A_1$ and A2$A_2$ have worst-case time bound p$p$ and q$q$,respectively respectively. Suppose algorithm A3$A_3$ consists of applying A2$A_2$ to the output of A1$A_1$.  (The input for A3$A_3$ is the input for A1$A_1$.) Give a worst-case time bound for A3$A_3$.

How could iI calculate the worst case based on the given info  ?

I had quiz last week and it says  : suppose algorithms A1 and A2 have worst-case time bound p and q,respectively. Suppose algorithm A3 consists of applying A2 to the output of A1.(The input for A3 is the input for A1.) Give a worst-case time bound for A3.

How could i calculate the worst case based on the given info  ?

I had quiz last week and it says: suppose algorithms $A_1$ and $A_2$ have worst-case time bound $p$ and $q$, respectively. Suppose algorithm $A_3$ consists of applying $A_2$ to the output of $A_1$.  (The input for $A_3$ is the input for $A_1$.) Give a worst-case time bound for $A_3$.

How could I calculate the worst case based on the given info?

Source Link

How to get Algorithm complexty based on another 2 algorithms?

I had quiz last week and it says : suppose algorithms A1 and A2 have worst-case time bound p and q,respectively. Suppose algorithm A3 consists of applying A2 to the output of A1.(The input for A3 is the input for A1.) Give a worst-case time bound for A3.

How could i calculate the worst case based on the given info ?