# Rosetta Code:Village Pump/Unknown sorting algorithm

Unknown sorting algorithm
This is a particular discussion thread among many which consider Rosetta Code.

# Summary

Question on what sorting algorithm this is.

# Discussion

Someone know what sorting algorithm is this? I just made it, and i don't know his name (Bogosort, Bubble Sort and etc.)

Take a look at my code:

<lang python>aunsorted = [6, 2, 7, 8, 3, 1, 10, 5, 4, 9] asorted = []

amin = aunsorted[0] aminindex = 0

while True:

for i in range(len(aunsorted)):
if aunsorted[i] < amin:
amin = aunsorted[i]
aminindex = i
del aunsorted[aminindex]
asorted = asorted + [amin]
if len(aunsorted) == 0: break
amin = aunsorted[0]
aminindex = 0

print asorted</lang>

<lang csharp>using System; using System.Collections.Generic;

public class Program {

static void Main() {
List<int> unsorted = new List<int>(new int[] { 6, 2, 7, 8, 3, 1, 10, 5, 4, 9 });
List<int> sorted = new List<int>();
int min = unsorted[0];
int minindex = 0;
while (true) {
for (int i = 0; i < unsorted.Count; i++) {
if (unsorted[i] < min) {
min = unsorted[i];
minindex = i;
}
}
unsorted.RemoveAt(minindex);