"""
This file has code for selection sort.
"""
__auther__="Prabhat Singh"

def selectionSort(array):
    length = len(array)

    index = 0

    for index in range(length):
        innerLoopIndex = index
        minimumValueIndex = index
        for innerLoopIndex in range (index + 1, length):
            if array[minimumValueIndex] > array[innerLoopIndex]:
                minimumValueIndex = innerLoopIndex
        
        array[index], array[minimumValueIndex] = array[minimumValueIndex], array[index]

def main():
    array = [75,14,2,33,1]

    print("Unsorted Array:", array)
    selectionSort(array)
    print("Sorted Array:", array)

if __name__=="__main__":
    main()
9e184adb74ef7f60b404f77f59159470872f1a8b
<mask token>


def main():
    array = [75, 14, 2, 33, 1]
    print('Unsorted Array:', array)
    selectionSort(array)
    print('Sorted Array:', array)


<mask token>

<mask token>


def selectionSort(array):
    length = len(array)
    index = 0
    for index in range(length):
        innerLoopIndex = index
        minimumValueIndex = index
        for innerLoopIndex in range(index + 1, length):
            if array[minimumValueIndex] > array[innerLoopIndex]:
                minimumValueIndex = innerLoopIndex
        array[index], array[minimumValueIndex] = array[minimumValueIndex
            ], array[index]


def main():
    array = [75, 14, 2, 33, 1]
    print('Unsorted Array:', array)
    selectionSort(array)
    print('Sorted Array:', array)


<mask token>

<mask token>


def selectionSort(array):
    length = len(array)
    index = 0
    for index in range(length):
        innerLoopIndex = index
        minimumValueIndex = index
        for innerLoopIndex in range(index + 1, length):
            if array[minimumValueIndex] > array[innerLoopIndex]:
                minimumValueIndex = innerLoopIndex
        array[index], array[minimumValueIndex] = array[minimumValueIndex
            ], array[index]


def main():
    array = [75, 14, 2, 33, 1]
    print('Unsorted Array:', array)
    selectionSort(array)
    print('Sorted Array:', array)


if __name__ == '__main__':
    main()

<mask token>
__auther__ = 'Prabhat Singh'


def selectionSort(array):
    length = len(array)
    index = 0
    for index in range(length):
        innerLoopIndex = index
        minimumValueIndex = index
        for innerLoopIndex in range(index + 1, length):
            if array[minimumValueIndex] > array[innerLoopIndex]:
                minimumValueIndex = innerLoopIndex
        array[index], array[minimumValueIndex] = array[minimumValueIndex
            ], array[index]


def main():
    array = [75, 14, 2, 33, 1]
    print('Unsorted Array:', array)
    selectionSort(array)
    print('Sorted Array:', array)


if __name__ == '__main__':
    main()

"""
This file has code for selection sort.
"""
__auther__="Prabhat Singh"

def selectionSort(array):
    length = len(array)

    index = 0

    for index in range(length):
        innerLoopIndex = index
        minimumValueIndex = index
        for innerLoopIndex in range (index + 1, length):
            if array[minimumValueIndex] > array[innerLoopIndex]:
                minimumValueIndex = innerLoopIndex
        
        array[index], array[minimumValueIndex] = array[minimumValueIndex], array[index]

def main():
    array = [75,14,2,33,1]

    print("Unsorted Array:", array)
    selectionSort(array)
    print("Sorted Array:", array)

if __name__=="__main__":
    main()