Question: Introduction In this section you will get familiar with the homework structure. Figure 1 : The array and the linked list Figure 2 : Filling
Introduction
In this section you will get familiar with the homework structure.
Figure : The array and the linked list
Figure : Filling the linked list using the array
Figure : Template codes
About Figure
As shown in the Figure an array called x array is defined with random numbers.
As shown in the Figure a region is initialized as starting with the address x to be used for the linked list.
As shown in the Figure the region for the linked list is filled by x array.
About Figure
As shown in the Figure ft lstfill function is used to fill the linked list area using the array.
ft lstfill function takes the size parameter s which is iterating through
So each time ft lstfill called with s first s number of integers in the x array are filled into the linked list to be sorted.
About Figure
As shown in the Figure as iterated once in the for loop, one can observe the first integers of x array is sorted using the linked list.
As shown in the Figure time and time asm are Which means ft lstsort is executed us or thereabouts.
Since ft lstsort asm is not yet implemented and also not yet called, instead ft lstsort is called, we might obviously expect time and time asm to be the same in each iteration.
About Figure
As shown in the Figure sorting numbers takes about us
In Figure templates for timing asm and ft lstsort asm are provided. You should implement these as detailed below:
System Timer
a You should implement SysTick Start asm for the Systick timer to start sending interrupts to the CPU. Check for the registers as shown in Figure
b You should implement SysTich Stop asm to stop Systick timer and save ticks value.
c You should go into timing.c delete SysTick Handlers C implementation, come back to timing asm.s and uncomment ;EXPORT SysTick Handler, and finallyimplement Systick Handler FUNCTION. Thus, you complete timer part.
Sorting Algorithm
a For sorting side of this homework, you should implement a bubble sort algorithm.
BigO Analysis
a And finally, if you go back to Figure you will see how to measure time passed for sorting the numbers.
b You are required to save the measurements for time and time asm for each iteration, and provide them as a graph in your report.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
