This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int[] InsertionSort(int[] inputArray) | |
{ | |
int[] outputArray = inputArray; | |
int tmp; | |
bool swapped; | |
int count = 0; | |
for (int i = 0; i < ARRAY_SIZE - 1; i++) // checking all numbers | |
{ | |
swapped = false; | |
for (int j = i + 1; j > 0; j--) // initializing the next number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int[] BubbleSort(int[] inputArray) | |
{ | |
bool swapped; | |
int[] outputArray = inputArray; | |
for (int i = 0; i < ARRAY_SIZE; i++) | |
{ | |
swapped = false; | |
for (int j = 0; j < ARRAY_SIZE - 1; j++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int[] SelectionSort(int[] inputArray) | |
{ | |
int[] outputArray = inputArray; | |
int temp, smallest; | |
for (int i = 0; i < ARRAY_SIZE; i++) | |
{ | |
smallest = i; | |
for (int j = i + 1; j < ARRAY_SIZE; j++) | |
{ | |
if (outputArray[j] < outputArray[smallest]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The class Node<T> **/ | |
public class Node<T> | |
{ | |
private T value; // Node value | |
private Node<T> next; // next Node | |
/* Constructor - returns a Node with "value" as value and without successesor Node **/ | |
public Node(T value) | |
{ | |
this.value = value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static Node<int> SortInput() | |
{ | |
Console.WriteLine("Insert Value | Insert '-999' to stop"); | |
int value = int.Parse(Console.ReadLine()); | |
Node<int> node = new Node<int>(value); | |
while (value != -999) | |
{ | |
node.SetNext(new Node<int>(value)); | |
Console.WriteLine("Insert Value | Insert '-999' to stop"); | |
value = int.Parse(Console.ReadLine()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
net start W32Time | |
w32tm /resync |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
iatest=$(expr index "$-" i) | |
####################################################### | |
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me | |
####################################################### | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc |