## Description

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

Bennett University Greater Noida Department of CSE

Subject Lab: Algorithms & Complexity Lab Duration: 10:40-12:35 Lab Code: ECSE202L Max Marks: 10

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

Bennett University Greater Noida Department of CSE

Subject Lab: Algorithms & Complexity Lab Duration: 10:40-12:35 Lab Code: ECSE202L Max Marks: 10

1 2 5 12 32 34 45 56 78

Complexity is: 29