Thursday, November 7, 2013

CSC508 DATA STRUCTURE HASH TABLE

SOLUTION FOR PROBLEM 1 Value to Hash : 2341 4234 2839 430 22 397 3920 h(x) = x mod 7 2341 % 7 = 3 4234 % 7 = 6 2839 % 7 = 4 430   % 7 = 3 22    % 7 = 1 397   % 7 = 5 3920 % 7 = 0 Original Table : 0 1 2 3 4 5 6 EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY SOLUTION USING SEPARATE CHAINING : Step 1 : insert value 2341 Calculation :...