Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Time Database Systems Architecture And Techniques

Authors: Kam-Yiu Lam ,Tei-Wei Kuo

1st Edition

1475784023, 978-1475784022

More Books

Students also viewed these Databases questions