answer.
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
Zinaida [17]
2 years ago
6

What is the average number of nodes accessed in search for a particular element in an unordered list? In an ordered list? In an

unordered array? In an ordered array?
Computers and Technology
1 answer:
mixer [17]2 years ago
7 0

Answer and Explanation:

1. In the case of the unordered list, the search algorithm is applied as the binary search would not be worked here also the time complexity for searching for n number of elements is O(n)

So the average number of nodes for the unordered list is n ÷ 2

2. For the ordered list, the same is to be considered i.e. n ÷ 2

Also it deals with the recepts of items and every item contains a relative position that represents an attribute of an item

3. For the unordered array, the same is to be considered i.e. n ÷ 2 but in this no sequence is followed

4. For the ordered array, the average number of nodes is (log_2n) - 1 and in this, the binary search is to be considered

You might be interested in
Identify two entities and 2 of their attributes from the given scenario.
polet [3.4K]

Bookstore and BookSearch are the two entities for the given scenario.

Explanation:

  • For the given Book.com virtual store, there can be two entities like Bookstore and BookSearch.
  • Bookstore can have all the details of the books in the virtual store. hence the attributes can be
  • Bookstore attributes: bookname, Authorname, Publisher, Publishedyear, Agegroup, category.
  • BookSearch entity can be used to search the books in the virtual store.
  • Booksearch attributes: bookname, category, bookid, authorname.
8 0
2 years ago
c++ Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is c
Ksivusya [100]

<u>Answer:</u>

<em>int fNumber,scndNumber = -1,  </em>

<em>dup = 0; </em>

<em>do { </em>

<em>cin >> fNumber; </em>

<em>if ( scndNumber == -1) { </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>else { </em>

<em>if ( scndNumber == fNumber ) </em>

<em>duplicates++; </em>

<em>else </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>} while(fNumber > 0 );  </em>

<em>cout << dup; </em>

<u>Explanation:</u>

Here three variables are declared to hold the first number which is used obtain all the inputs given by the user, second number to hold the value of <em>last encountered number and “dup” variable to count the number of duplicate values.</em>

<em>“Do-while”</em> loop help us to get the input check whether it is same as previous input if yes then it <em>adds to the duplicate</em> value otherwise the new previous value if stored.

4 0
1 year ago
Read 2 more answers
Ishaan is confused between the terms webpage and website help him in understanding the difference between both​
alexgriva [62]

Answer:

A webpage is a class website and a website is a link where you can find useful information.

Explanation:

Please follow

7 0
2 years ago
Frequency of failure and network recovery time after a failure are measures of the _______ of a network.
coldgirl [10]
Frequency of a failure and network recovery time after a failure are measures of the Reliability of a network
8 0
1 year ago
What makes you normally visit the site-graphics, layout, or content? Why?​
Vinvika [58]

Answer:

robux

Explanation:

robux

8 0
1 year ago
Read 2 more answers
Other questions:
  • If you want to present slides to fellow students or coworkers which productivity software should you use to create them A. Word
    14·2 answers
  • If a car's is malfunctioning, people in the car will become ill when driving long distances, especially if the windows are close
    6·2 answers
  • Who are the founders of video-sharing site Dailymotion?
    7·1 answer
  • What is the first step to apply the line and page breaks options to groups of paragraphs in a Word document?
    8·2 answers
  • Write a client program that writes a struct with a privateFIFO name (call it FIFO_XXXX, where XXXX is the pid that you got from
    11·1 answer
  • Suppose that each row of an n×n array A consists of 1’s and 0’s such that, in any row i of A, all the 1’s come before any 0’s in
    15·1 answer
  • Chris accidentally steps on another student’s foot in the hallway. He apologizes, but the other student does not want to hear it
    13·2 answers
  • Assume you have a variable, budget, that is associated with a positive integer. Assume you have another variable, shopping_list,
    11·1 answer
  • A security administrator is implementing a SIEM and needs to ensure events can be compared against each other based on when the
    11·1 answer
  • In a system where Round Robin is used for CPU scheduling, the following is TRUE when a process cannot finish its computation dur
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!