Initial commit

This commit is contained in:
2020-12-07 09:58:52 +01:00
commit a390fdc558
8 changed files with 630 additions and 0 deletions

29
LinearSearch.cpp Normal file
View File

@@ -0,0 +1,29 @@
#include "LinearSearch.h"
#include <iostream>
using namespace std;
void Read(int a[], int& size_ref, int max_size)
{
// Do my stuff
size_ref = 0;
for (int i = 0; i < 15; i++) {
a[i] = rand();
cout << "a[" << i << "]: " << a[i] << endl;
size_ref++;
}
}
void Print(const int a[], int size)
{
cout << "Array size of a[]: " << size << endl;
for (int i = 0; i < size; i++)
cout << "a[" << i << "]: " << a[i] << endl;
}
int LinearSearch(const int array[], int key, int size)
{
return 0;
}