Ask Question
18 November, 15:12

Give a big-O estimate for the number of comparisons used by the algorithm that determines the number of 1s in a bit string of length n by examining each bit of the string to determine whether it is a 1 bit.

+3
Answers (2)
  1. 18 November, 16:44
    0
    The notation would be O (n-1) because there would be no need to compare with the first bit however this notation is most commonly noted as O (n) but the first is also technically correct
  2. 18 November, 17:59
    0
    The answer is "n".

    Algorithms are considered to be process or a bunch or rules that is to be followed in computing or calculating. This is used to solve operational problems especially by a computer. Algorithms perform data processing, calculation, or/and automated reasoning activities.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Give a big-O estimate for the number of comparisons used by the algorithm that determines the number of 1s in a bit string of length n by ...” 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