Data Structures Code
Data Structures Code
## 1) <br/> <br/>


step 1: Enter the first number and store it in a variable named a. <br/>
step 2: Enter the second number and store it in a variable named b. <br/>
DECLARE a, d ,c <br/>
INPUT a <br/>
INPUT b <br/>
c=a <br/>
a=b <br/>
b=c <br/>
return <br/>
<br>
<br>
<br>

<br/>
<br/>
<br/>
This is C code where i have created an array of 4 items and printed out the
first item of index 0. This is a demonstarion of constant time complexity
using Big Oh notation.<br/>
This is because the time required to extraxt any item located in an index n of
the array is equal to the time reuired to extract the first item of the
array<br/><br/>
#### code:<br/>
#include <stdio.h>
#include <time.h>
int main() {<br/>
double time_taken;<br/>
start = clock();<br/>
end = clock();<br/>
#### algotithm:<br/>
O(n)<br/>
<br>
#### code:<br/>
start = clock();<br/>
}<br/>
end = clock();<br/>
<br/><br/>
#### algotithm:<br/>
<br/><br/>
O(n2)<br/>
#### code:<br/>
start = clock();<br/>
}<br/>
}<br/>
end = clock();<br/>
#### algotithm:<br/>
1. Initialize two arrays: one for names and one for aliases.<br/>
3. For each name, iterate over the aliases array (inner loop).<br/>
For more information please do not hesitate to get in touch with the ripo
owner at [email protected]