Question: SCHAUM'S OUTLINES Discrete Mathematics Third Edition COMPUTER PROBLEMS Problems 10.34 to 10.40 refer to Fig. 10-37 which is a list of employee records stored in

SCHAUM'S OUTLINES

Discrete Mathematics Third Edition

COMPUTER PROBLEMS Problems 10.34 to 10.40 refer to Fig. 10-37 which is a list of employee records stored in memory. It is a binary search tree with respect to the NAME key. It uses a pointer HEAD where the number of employees is in SSN[HEAD], the total salary is in SALARY[HEAD], and the root of the tree is in LEFT[HEAD]. Also, to allow insertions, the available (empty) locations form a linked list with AVAIL pointing to the first element in the list, and the linking is maintained by the array LEFT.

Write a program which reads the record of a new employee and inserts the record in the file. Test the program using: (a) Fletcher; 168-52-3388; Female; 21 000; (b) Nelson; 175-32-2468; Male; 19 000.

D) NAME SSN SEX SALARY LEFT RIGHT HEAD 2 Davis 3Kelly 4 Green Female Male Male 22 800 19 000 27 200 191 600 14 700 16 400 12 192-38-7282 165-64-3351 175-56-2251 009 178-52-1065 181-58-9939 AVAIL 14 6 Brown emale 7 Lewis Female 19 000 15 500 9 Cohen 177-44-4557 Male 4 135-46-6262 Female 10Rubin 12 Evans 4 Harris 13 168-56-8113 Male 34 200 208-56-1654 Female 22 800

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!