diff --git a/selection sorting.py b/selection sorting.py new file mode 100644 index 0000000..c5a13f9 --- /dev/null +++ b/selection sorting.py @@ -0,0 +1,17 @@ +#selction sort +n=int(input("Enter the number of elements u want in the list to sort")) +list=[] +for i in range(0,n): + element=int(input("ENter the element for the list")) + list.append(element) +print("before sorting") +print(list) +for i in range(0,len(list)-1): + minindex=i + for j in range(i+1,len(list)): + if list[j]