namespace datastructures;
using System;
using System.Diagnostics;
using System.Threading;
class Program
{
static void Main(string[] args)
{
int[] numbers = GenerateRandomNumbers(50_000);
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
// TEST FUNCTION HERE!
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
string elapsedTime = String.Format("{0:00}.{1:0000000} seconds",
ts.Seconds, ts.Ticks % TimeSpan.TicksPerSecond);
Console.WriteLine("RunTime " + elapsedTime);
}
// =========================================================================
// count average with array and list (print result)
// use array with 100_000 or million numbers
public void AverageWithArray(int[])
{
}
public void AverageWithList(int[])
{
}
// =========================================================================
// create "key press history (numbers)"
// use data structure and code following actions:
// add 100_000
// remove 5_000
// add 100_000
// add 100_000
// try to remove 400_000
public void ArrayForKeyPressHistory()
{
}
public void StackForKeyPressHistory()
{
}
// =========================================================================
// You have array or linked list with 10_000 random numbers (1-9)
// remove all two numbers from both arrays
// You can try different lengths
public void Remove2FromArray()
{
}
public void Remove2FromLinkedList()
{
}
// =========================================================================
// EXTRA: create family tree
// do imaginary family with parents, children, cousins, grandparents etc...
// build some way to print info about persons...
// =========================================================================
public static int[] GenerateRandomNumbers(int count)
{
Random random = new Random();
int[] randomNumbers = new int[count];
// Generate random numbers between 1 and 10 000
for (int i = 0; i < count; i++)
{
randomNumbers[i] = random.Next(1, 10);
}
// Return the array
return randomNumbers;
}
}