Question: Please use the Go programming language The following code shows how to access the rows of a2D array represented by a slice of slices. package

Please use the Go programming language
Please use the Go programming language The following code shows how to
access the rows of a2D array represented by a slice of slices.
package main import "fmt" func fct(line []float64) for ,v:= range line f

The following code shows how to access the rows of a2D array represented by a slice of slices. package main import "fmt" func fct(line []float64) for ,v:= range line f fmt. Printf("of, ", v) \} Junc main() a) Write a function sort (tab []float 64) that sorts a 1D slice of floating point numbers. Use the algorithm of your choice. b) Write a function transpose (tab [] []float 64 ) that transposes a matrix represented by a slice of slices (rows become columns and vice versa). c) Write a function sortRows (tab [] [] float 64) that sorts the rows of a slice of slices. Each row must be sorted in separate thread. The function must return only when all the threads have completed their sort operation. d) Test your functions by writing a main function that proceeds as follows: a. Print the input 2D array to console b. Sort the rows of this array with sortRows c. Transpose the array with transpose d. Sort the rows of this array with sortRows e. Transpose the array with transpose f. Print the output 2D array to console Show your results on the two arrays in the code provided

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!