Question

When searching through a heap file for a record, you must do: A. Hashing B. Build...

When searching through a heap file for a record, you must do:

A. Hashing

B. Build a binary search tree in memory.

C. Linear Search

D. Binary Search

0 0
Add a comment Improve this question Transcribed image text
Answer #1


C) linear search

heaps are not designed for searching like binary search trees of hash maps etc..

so, we will have to do linear search through a heap for finding a record.

Add a comment
Know the answer?
Add Answer to:
When searching through a heap file for a record, you must do: A. Hashing B. Build...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. In Lab 4, you developed a program to build a Max Heap, and then Heap...

    1. In Lab 4, you developed a program to build a Max Heap, and then Heap Sort. Update the program by adding two additional functions: (a) AddData(A, N, V) where V is the new value added. (b) Delete a data Delete by giving the index of the data position Make sure to display the array after calling each of the function. 2. Write a program to implement Binary Search Algorithm, which will return the index of the data searched (V)....

  • Database a) Roughly describe how a binary search works. You don’t need to give pseudocode or an e...

    Database a) Roughly describe how a binary search works. You don’t need to give pseudocode or an exact algorithm, but explain the principle or point of how it works. b) In a binary search, does the number of operations required grow roughly exponentially or logarithmically with the number of items to be searched?        c) Can a binary search be done on a “heap” file? Explain why or why not. d) Explain why hashing can (usually) provide very fast lookups (retrieval)...

  • Must be in JAVA 1. Design and implement a Binary Heap class that must support "insert"...

    Must be in JAVA 1. Design and implement a Binary Heap class that must support "insert" and "deleteMin" operations 2. Design and implement a driver (the main method) that does the following: (a) Creates an array that contains a list of 4099 integers, in a random order, between 0 to to 4098. (b) insert, into the first binary heap that is initially empty, the numbers in the array sequentially from the start to the end (c) Initialize the second empty...

  • 1. In a heap, the upper bound on the number of leaves is: (A) O(n) (B)...

    1. In a heap, the upper bound on the number of leaves is: (A) O(n) (B) O(1) (C) O(logn) (D) O(nlogn) 2. In a heap, the distance from the root to the furthest leaf is: (A) θ(nlogn) (B) θ(logn) (C) θ(1) (D) θ(n) 3. In a heap, let df be the distance of the furthest leaf from the root and let dc be the analogous distance of the closest leaf. What is df − dc, at most? (A) 1 (C)...

  • 11.Writeadeclarationtocreateadataty pecalled : DICTIONARY thatrepresentsanopenhashing schemewith20buckets 10. Given that F is a direct access file with...

    11.Writeadeclarationtocreateadataty pecalled : DICTIONARY thatrepresentsanopenhashing schemewith20buckets 10. Given that F is a direct access file with n = 2000 records and that the records are stored in order of their keys. Determine how many record reads it would take to locate a particular record using: a. sequential search b. binary search c. (open) hashing with 200 buckets d. (open) hashing with 400 buckets (average case) (worst case) (average case.): (average case) 11. Write the declarations to create a data type...

  • In the lectures, we studied binary heaps. A min-Heap can be visualized as a binary tree...

    In the lectures, we studied binary heaps. A min-Heap can be visualized as a binary tree of height with each node having at most two children with the property that value of a node is at most the value of its children. Such heap containing n elements can be represented (stored) as an array with the property Suppose that you would like to construct a & min Heap: each node has at most& children and the value of a node...

  • Overview: file you have to complete is WordTree.h, WordTree.cpp, main.cpp Write a program in C++ that...

    Overview: file you have to complete is WordTree.h, WordTree.cpp, main.cpp Write a program in C++ that reads an input text file and counts the occurrence of individual words in the file. You will see a binary tree to keep track of words and their counts. Project description: The program should open and read an input file (named input.txt) in turn, and build a binary search tree of the words and their counts. The words will be stored in alphabetical order...

  • secondary clustering in a hash table occurs when using a. separate chaining b. double hashing c....

    secondary clustering in a hash table occurs when using a. separate chaining b. double hashing c. linear probing d. quadratic probing

  • Systems Architecture 7--> By default, what do most file management and operating do when a user...

    Systems Architecture 7--> By default, what do most file management and operating do when a user deletes a file? A) mark the storage allocation unit as free and the directory entry as unused B) overwrite all allocated storage with spaces or other null content C) Remove the entry from secondary storage   D) Mark the directory entry as used 8--> Linux file access control types include________ A) read, write and change B) read, modify and list C) read, write and execute...

  • Programming Project #5 – Binary Tree Exercise 19 on page 637 of the text a through...

    Programming Project #5 – Binary Tree Exercise 19 on page 637 of the text a through f Here is the array to build the initial binary tree: int [] data = { 50, 30, 60, 10, 80, 55, 40 }; BUT, make sure the code works with any binary tree created from an array named data In addition to the main .java file, make sure you also create a Node.java and a Tree.java file that contain the code that allows...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT