Question
C++ program: radix sort using hash table concept the answer should satisfy 1, input data should be string in text file. bucketSize (int) // set
C++ program: radix sort using hash table concept
the answer should satisfy
1, input data should be string in text file. bucketSize (int) // set to 29.
2,The method dynamically allocate the hashTableAry,where each entry point to a dummy node: (dummy, 0, null).
reads a data from inFile, gets the index from hash function, and stores the data into the hash table.Given an English word, the method returns the index of hashTableAry, where the data will be insert into the linked list pointed by hashTableAry [index].The method calls printList method to print the entire 29 linked list of the hash table.
3,The method calls printNode method to print each node in the entire linked list, pointed by the hashTableAry[index] to a given outFile, using the following format:
hashTable[index] -> (this node data, this nodes count, next nodes data) -> (this node data, this nodes count, next nodes data) ->
. . . . . -> NULL.For example: if index is 5
hashTable [5] -> ( dummy, 0, Adam) -> (Adam, 1, Ben) -> (Ben, 2, Brian) -> (Brian, 2, Chuck)........................ -> NULL
string in text file
Hishaam Esteban Kevin Matthew Brandon Joel Luis Jianwei Yechiel Taeyong Jiayu Jiade Phillip Russell Mohebullah Akshar Evgeniia Andres Marco Justin Robin Kelvin Zhiheng Jeffrey Yifei Yinyu Jiaxin Youyia Eleftherios Yuan Resfred Danielle Jason Lin ZhengZhong Han Chandra Conghui Christopher Christina Rashad Aaron Gregory Xihao Yuhuan Niraj Logan Ba Khoi Jiade Pinpin Seth Jacb Russell Win Thurein Karamvir Andres Shadman Rani Prince Patricio Christopher Angelo Denny Laert Zhiheng Taejoon Heesun Joseph Bee Sim Kenny Jasmin Ben Qisheng Michael Cheng Brandon Peter Oscar Qi Juan Brian Colin Harmandeep Brian Wei Yangfan Emanuel Huihui Cesar Shuhua
EX a Suroy codry schene ord (o)=0 ad ord (o)-9 ord.CA)-10 ord("") 3 *-- new & always put on back="it's Quered mcexam ist digat ontheright Dry for utesers Radix sort using flash table concept must know table size & Hush Punc = F(X)=X Leable se 231 and digit 1 1 3181 240 H77 sort 8 92 927 987 input N - 11- 39 tool1 702 I 172) Radix ANNNNNNN ML To 3 +7-717-797 7231778 + 0 4007--0047-0033--092-7024070318-70987 SNMG n=NININ+N =(3+1)=40-W 5-("A00","101", "A02" ... 499) N=100 B=100(bockets) Hush) - mod cord(4x))t od (x_])+ ord (X[2]). Los) Hash ("A03) - 13 Hash ("A04) = 14 Hash ("A09 = 19 (A36) = 19 ("A63) = 19 Please use this function (X- character seras B- # of buckets Hash (X) = mod (doit (X). B) Tral = 1; int doit (string ) for (i = 0; iStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started