Question
Make use of a random number generator to generate a list of 500 three-digit numbers. Create a sequential list FILE of the 500 numbers. Artificially implement storage blocks on the sequential list with every block containing a maximum of 10 numbers only. Open an index INDX over the sequential list FILE which records the highest key in each storage block and the address of the storage block. Implement Indexed Sequential search to look for keys K in FILE. Compare the number of comparisons made by the search with that of the sequential search for the same set of keys.
Extend the implementation to include an index over the index INDX.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, data-structures-and-algorithms and related others by exploring similar questions and additional content below.Similar questions
- Using Java, 1. Implement external sort: for sort phase use normal sort, for merge phase use two way merge to merge n sorted files (merge2way(n)), for array sort use heapsort. Also write merge(f1, f2, f3) to merge two sorted files f1 and f2 into f3.. Write mergenway(n) method and print execution time of both merges for initial input file over 10MB data. A sample input is as follow:Note:Fist input is max array size for sort 10 84 82 52 80 96 85 75 75 82 87 92 89 57 94 93 92 63 99 87 72 73 56 74 50 84 62 72 55 86 75 74 100 83 60 53 68 89 67 66 65 72 94 73 54 98 96 85 75 75 82 87 92 89arrow_forward+ enuity.com/Player/ emester A 4 5 Mark this and return M BO DELL A user is going to process an unspecified quantity of numbers. The desired result is to have the numbers ordered from smallest to largest. Which statement is true? Select three options. You could use a loop to add the numbers to a list, and then use an insertion sort to order the list. You could use a loop to add the numbers to a dictionary, and then use a built-in sort method to sort the dictionary. You could use a loop to ask the user for the numbers, adding them to a list. Then use the built-in sort method to order the list. You could use a loop to add numbers to a list. Then use a binary search to sort the list. You could use a spreadsheet to enter the numbers, and then use the spreadsheet sort method from the menu to sort the numbers. Save and Exit Next < English Sign out Kinley TIME REMAINING 57:01 Submit D Mar 27 12:0arrow_forwardWrite a program (call it intersection.py) that finds all gene symbols that appear both in the chr21_genes.txt file and in the HUGO_genes.txt file. These gene symbols should be printed to a file in alphabetical order (you can hard code the output file OUTPUT/intersection_output.txt) . The program should also print on the terminal how many common gene symbols were found. Use Lists or Sets to solve the problem. It is fine to use a temporary Dictionary to find the intersection of two Lists, but this can be simplified with Sets. Note: HUGO_genes.txt could have some duplicate entries.Remember to have these command line options:$ python3 intersection.py -h usage: intersection.py [-h] -i1 FILE1 -i2 FILE2 Provide two gene list (ignore header line), find intersection optional arguments: -h, --help show this help message and exit -i1 INFILE1, --infile1 INFILE1 Gene list 1 to open -i2 INFILE2, --infile2 INFILE2 Gene list 2 to open $ python3 intersection.py -i1 chr21_genes.txt -i2 HUGO_genes.txt #…arrow_forward
- Here is the iterative implementation of binary search: For each call to binary_search below, indicate how many times the code inside the while loop will execute. animals = ["aardvark", "cat", "dog", "elephant", "panda"] 1. binary_search("elephant", animals) 2. binary_search("dog", animals) 3. binary_search("anteater", animals)arrow_forwardDefine a collection “ArrayList” to store the students' names. Use a loop to take 5 students’ names from the user and store them in the collection. Add two student names to the collection and remove the last name in the list. Insert a student name in third place in the collection. Sort the names alphabetically. Ask the user to enter a student name and search for it in the collection and prints the result as “Found” or “Not Found”. Print the whole collection using the enhanced for loop. (java)arrow_forwardWrite a python program that reads the contents of a text file. The program should create a dictionary in which the keys are the individual words found in the file and the values are the number of times each word appears. For example, if the word "the" appears 128 times, the dictionary would contain an element with 'the' as the key and 128 as the value. The program should either display the frequency of each word or create a second file containing a list of each word and it's frequency. This program has really been giving me trouble. Any help is great appreciated. Thanks so much!arrow_forward
- This code is full of errors, what are 4 of them and how I would fix them?arrow_forwardWrite a python program that stores current grades in a dictionary, with course codes as keys and percent grades as values. Start with an empty dictionary and then use a while loop to enable input of course codes and percent grades from the keyboard. Enter data for at least five courses. After entering the data, use a for loop and the keys to show the current status of all courses. This same loop should include code that enables determination of the worst course and the average of all courses. Both of these findings should be printed when the loop ends. The worst course should be dropped and reported. This being done, the program should use another loop and the items method to display the revised courses and grades and report the revised term average.arrow_forwardCreate class Test in a file named Test.java. This class contains a main program that performs the following actions: Instantiate a doubly linked list. Insert strings “a”, “b”, and “c” at the head of the list using three Insert() operations. The state of the list is now [“c”, “b”, “a”]. Set the current element to the second-to-last element with a call to Tail() followed by a call to Previous()Then insert string “d”. The state of the list is now [“c”, “d”, “b”, “a”]. Set the current element to past-the-end with a call to Tail() followed by a call to Next(). Then insert string “e”. The state of the list is now [“c”, “d”, “b”, “a”, “e”] . Print the list with a call to Print() and verify that the state of the list is correct.arrow_forward
arrow_back_ios
arrow_forward_ios