1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lara31 [8.8K]
2 years ago
11

You are searching for an item in an array of 40,000 unsorted items. The item is located at the last position. How many compariso

ns do you need to do to find it
Computers and Technology
1 answer:
irina [24]2 years ago
4 0
It depends on what algorithm you’re using.
If you’re going item by item, you’ll be looking at O(n) or O(40000)
Give me a reply if you want to know more, such as if you did binary search what the Big O notation is
You might be interested in
Write a program that prompts the user to enter a series of numbers between 0 and 10 asintegers. The user will enter all numbers
Anna71 [15]

Answer:

The program in Python is as follows:

import collections

from collections import Counter

from itertools import groupby

import statistics

str_input = input("Enter a series of numbers separated by space: ")

num_input = str_input.split(" ")

numList = []

for num in num_input:

         if(num.lstrip('-').isdigit()):

                   if num[0] == "-" or int(num)>10:

                             print(num," is out of bound - rejecting")

                   else:

                             print(num," is valid - accepting")

                             numList.append(int(num))

         else:

                   print(num," is not a number")

print("Largest number: ",max(numList))

print("Smallest number: ",min(numList))

print("Range: ",(max(numList) - min(numList)))

print("Mode: ",end = " ")

freqs = groupby(Counter(numList).most_common(), lambda x:x[1])

print([val for val,count in next(freqs)[1]])

count_freq = {}

count_freq = collections.Counter(numList)

for item in count_freq:

         print(item, end = " ")

         lent= int(count_freq[item])

         for i in range(lent):

                   print("#",end=" ")

print()

Explanation:

See attachment for program source file where comments are used as explanation. (Lines that begin with # are comments)

The frequency polygon is printed using #'s to represent the frequency of each list element

7 0
2 years ago
Identify the following verb by number and person by checking on the appropriate boxes.
Makovka662 [10]
Second person ig Imao yeah
3 0
2 years ago
Read 2 more answers
Question 7 (1 point)<br> Increasing hue levels means increasing saturation.<br> True<br> False
Temka [501]

Answer:

mae me brainlier

false

7 0
3 years ago
Who is the author of computer programming pdf
mash [69]
Donald Knuth<span> began the project, originally conceived as a single book with twelve chapters, in 1962.</span>
5 0
3 years ago
What does 32mb SVGA do
Nadya [2.5K]

Answer:

hope it helps PLZ MARK ME BRAINLIEST,,!

Explanation:

They stabilize your grpahic image.

5 0
2 years ago
Other questions:
  • You are logged in as a user with limited system privileges, you are the linux system administrator and you have the password to
    5·1 answer
  • Which of the following is the best example of a manager with a delegator leadership style
    10·2 answers
  • Which is the process that a wireless router uses to translate a private ip address on internal traffic to a routable address for
    14·1 answer
  • The right of workers to seek safety and health on the job without fear of punishment is spelled out in:
    8·1 answer
  • As Alexa types a message, Outlook autosaves the message at various points. In which folder is the message located if Alexa wants
    15·2 answers
  • Hardware consists of the physical devices associated with a computer system, where software is the set of instructions the hardw
    13·1 answer
  • If you wanted to detect x-rays coming from the sun,where would you place the detector? Why?
    6·1 answer
  • List four significant differences between a file-processing system and a database management system (DBMS).
    5·1 answer
  • High level language - An object oriented programming language​
    5·1 answer
  • Snippet 1: check_file_permissions.c #include
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!