Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Derive the random number N as many as entered from the keyboard. Each number does not have to be unique. These generated numbers should be
Derive the random number N as many as entered from the keyboard. Each number does not have to be unique. These generated numbers should be printed in the input.txt file. generated numbers must be shuffled with a hash ( shuffle ) algorithm before being converted into a Heap tree. You determine the mixing method and specify this method in your codes. Write the push and pop functions . Read all the numbers in the text file up to EOF and transfer them to Heap. Then Heap Sort with sort, print the result to the output file (output.txt). Files to be submitted: - randomNumberGenerator.c - shuffle.c - myHeap.c Descriptions - The randomNumberGenerator.c file should consist of 15% one-digit, 15% two-digit, 15% three-digit ... numbers . - For N=1,000,000 your codes should be able to work
Step 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