## Search – Indexed Sequential Search

Indexed Sequential Search: In this searching technique, first of all an index file is created that contains references to a group of records, once an index is obtained, the partial searching takes less time since it is to be located in the group/bucket specified by the index. The program given below creates an index file for the employee records by grouping the records and then locates the required key by…

Read more...## Sorting on multiple keys

are closed

Sorting on multiple keys The sorting algorithm may be applied on multiple keys such that if first field contains duplicate values, then sorting is done on a secondary field and so on. However, if the first field contains unique values, then sorting is not applied on secondary field. Say for example: The input for the combination {studentname, feeamt} { (xyz,3000), (abc,1000), (xyz, 1000), (abc,3000)}; will result in the following output:…

Read more...## Sorting – Address Calculation Sort (Hashing)

are closed

Sorting – Address Calculation Sort (Hashing) In this method a function f is applied to each key. The result of this function determines into which of the several subfiles the record is to be placed. The function should have the property that: if x <= y , f (x) <= f (y), Such a function is called order preserving. An item is placed into a subfile in correct sequence by…

Read more...## Sorting – Quick Sort (Partition Exchange Sort)

are closed

Sorting – Quick Sort (Partition Exchange Sort) Suppose x be an array, n is the number of elements. Choose an element from a specific position within the array. Array x is partitioned so that y is placed into position j, and the following conditions hold: 1) Each of the elements in position 0 through (j-1) is less than or equal to y. 2) Each of the elements in position (j+1)…

Read more...
are closed