Ask Question
18 August, 12:52

Suppose we perform a sequence of n operations on a data structure such that if some condition C (k) holds then the kth operation takes O (k) time, but otherwise it only takes O (1) time. For each condition C (k) listed below, determine the total time T (n) for the sequence of all n operations, and also the amortized time Tamortized (n) per each operation

a) If C (k) is "k is a power of 3" then T (n) - O (n4/) and Tamortized (n) O (n13).

b) If C (k) is "k is a multiple of 2" then T (n) - O (n) and Tamortized (n) = O (1).

c) If C (k) is "k is a perfect square" then T (n) O (n4/3) and Tamortized (n) = O (n13). O

d) If C (k) is "k is a multiple of 2" then T (n) = O (n2) and Tamortized (n) = O (n)

+3
Answers (1)
  1. 18 August, 13:56
    0
    stay home, stay safe, dont get corona virus
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Suppose we perform a sequence of n operations on a data structure such that if some condition C (k) holds then the kth operation takes O ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers