[SOLVED] 代写 algorithm • •

30 $

File Name: 代写_algorithm_•_•.zip
File Size: 226.08 KB

SKU: 0422473151 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


• •
Some Clarifications Over Assignment 2
In question 2.4 you are asked to construct a min-heap. Here you shouldn’t do modifications to the MAX-HEAPIFY algorithm.
In programming questions:
1.
2.
3. 4.
5. 6.
You do not need to put any prompts. Make sure that your output is in the same format as expected_output.txt and the differences between your output.txt and my expected_output.txt only lie in the running time.
Select item: You do not need to use the SELECT algorithm since the array will be already sorted.
Median: When the array size is even number, please return the lower median.
You also do not need to do any error handling in testing if Start and End always come in pairs. In the test command sequence used for grading, Start and End always come together.
But make sure that your Start Name or End Name can handle any filenames, for example, the data file I will use may be called test_10.txt.
In the coding problem, you will need to open the test file in the folder data_files. You should put that data folder inside Code folder. And before compressing and submitting your work, you should delete data_files from Code.
So when you specify the file path, it should be like this: string filename=”test_1”;
string file_path = “../data_files/” +filename+”.txt”;
Do not use any absolute file path. The following code will not be accepted: string filename=”test_1”;
string file_path = “C://JonSnow/data_files/” +filename+”.txt”;
To help you better understand what you are required to do, I’ve uploaded an input file called input.txt containing the sequence of commands in the example given by instruction, and an expected output file called expected_output.txt.
Then you can check if your program runs correctly, by feeding your program with input.txt and storing your own results in output.txt.
$./a2 < input.txt > output.txt
7.
Except for the running time durations, you should expect no difference between the output.txt generated by your program and the expected one. To check the differences, you call use a tool called diff which will produce a report showing the differences between the two files:

$diff –Bw output.txt expected_output.txt > diff.txt
and store the details of difference into a file called diff.txt. The options -Bw tell diff to
ignore whitespace differences between the two files.
I also attached an expected_diff.txt. You will see that the only differences should be in the “Time to run ” parts and the differences of running time should be minor.
• How to compress your submission: for example, in your folder JonSnow you created a Code folder and a JonSnow.pdf. Please compress the Code folder and JonSnow.pdf together into a zip file called JonSnow.zip, instead of compressing the JonSnow folder.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 algorithm • •
30 $