ECSE202L  Lab Assignment 8 solution


Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment


5/5 - (4 votes)

Q1. In this assignment, students are required to read a file (Lab8_input.txt) and write down the sorted array in a file named Lab8_output.txt using Shell sort with the time complexity (No. of required iterations) for reading and writing data in file. The increment sequence to be followed is 5,3,1.
For example, suppose the lab8_input.txt holds following value: First number gives the total number in array
Expected output: A output file by name “Lab8_output.txt”
9 8 1 4 1 5 9 2 6 5
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 store the matrix representation of graph in the file Lab8_input2.txt and find the minimum spanning tree using either Kruskal/Prim’s Algorithm and store the result back into Lab8_output2.txt. Also return the time complexity for generating Lab8_output2.txt file.

9 1 1 2 4 6 5 2 8 9
Complexity is: —