Sorting: Bubble Sort

  • + 0 comments

    Having a question where the formatting of the answer needs to be exact is misleading. I had an extra space

    Compiler Message

    Wrong Answer

    Input (stdin)

    3
    
    1 2 3
    

    Your Output (stdout)

    Array is sorted in 0 swaps.
    
    First Element:  1
    
    Last Element:  3
    

    Expected Output

    Array is sorted in 0 swaps.
    
    First Element: 1
    
    Last Element: 3