Search on a hashed file, Data Structure & Algorithms

Write a program to simulate searching over a hashed file, with different assumptions for the sizeof file pages.Write a program to perform equality search operations on the hashed file produced by yourwHash program in previous section. The executable name of this program must be sHash and it mustbe able to be executed using the command:

> ./sHash search_2013 hashed pagesize


where search_2013 is the name of the file containing the ID keys to be searched for; hashedis the output file of your wHash program; and pagesize is an integer value that specifies thesize of the disk page that you are simulating. (Note: the pagesize parameter that you specifyfor searching should match the pagesize parameter that you used for constructing the hashedfile, otherwise your results will not make sense.)

Your program must take advantage of the assumption that hashed is a file whose structure has been created by hashing on the ID key. Your program should read in required parts of thefile, one "page" at a time. For example, if the pagesize parameter is 100, your program shouldfetch 100 records in a single read from disk. These can then be scanned, in-memory, for amatch.

If a match is found, the program must print the matching record to stdout. If no match is found, a suitable message should be printed. In addition, the program must output the total timetaken to do all the search operations in milliseconds to stdout. For example, if the time takento do the reading is 123:45 ms, the output would be:

Time: 123.45 ms

Posted Date: 5/6/2013 3:37:04 AM | Location : United States

Related Discussions:- Search on a hashed file, Assignment Help, Ask Question on Search on a hashed file, Get Answer, Expert's Help, Search on a hashed file Discussions

Write discussion on Search on a hashed file
Your posts are moderated
Related Questions
Program segment for deletion of any element from the queue delete() { int delvalue = 0; if (front == NULL) printf("Queue Empty"); { delvalue = front->value;

Determine the class invariants- Ruby Ruby has many predefined exceptions classes (like ArgumentError) and new ones can be created easily by sub-classing StandardError, so it's

how I can easily implement the bubble,selection,linear,binary searth algorithms?


1. Write a pseudocode algorithm to print the numbers from 1 to 10, and then from 10 to 1, using exactly one loop. 2. The function contains() takes a food as an argument and tell

algorithm to search a node in linked list

A binary search tree is constructed through the repeated insertion of new nodes in a binary tree structure. Insertion has to maintain the order of the tree. The value to the lef

Step-1: For the current node, verify whether it contain a left child. If it has, then go to step-2 or else go to step-3 Step-2: Repeat step-1 for left child Step-3: Visit (th

A Binary Search Tree is binary tree which is either empty or a node having a key value, left child & right child. By analyzing the above definition, we notice that BST comes int

This is a unit of which targeted on the emerging data structures. Red- Black trees, Splay trees, AA-trees & Treaps are introduced. The learner must explore the possibilities of app