ECSE202L Lab Assignment 4

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (2 votes)

Q1. In this assignment, students are required to read a file (Lab3_input.txt) created in
assignment 3 and write down the content in a file named Lab4_input.txt with the time
complexity (No. of required iterations) for reading and writing data in file.
For example, suppose the lab3_input.txt holds following value:

Expected output: A output file by name “Lab4_input.txt”
12
34
5
2
56
78
32
5
1
45

Q2. In this question, students are required to read the file Lab4_input.txt and sort the
data using Merge Sort algorithm. The expected answer must be written in a file named
Lab4_output.txt including sorted value and Time complexity of algorithm. The sample
output file is given as:
Q3. In this question, student read the output file generated in question 2 (Lab4_output.txt)
and remove the duplicate entries. Then the remaining data will undergo again in merge
sort algorithm and return the sorted data with Time complexity in file Lab4_output2.txt.
Expected Output:
12
34
5
2
56
78
32
5
1
45
Complexity is: 10
1
2
5
5
12
32
34
45
56
78
Complexity is: 34

1
2
5
12
32
34
45
56
78
Complexity is: 29