An algorithm is correct when it produces the expected answer for the specified problem across its inputs, within the required time. Correctness is a basic quality to consider alongside verifiability and ease of implementation. section 1.2 section 1.2.1
Sorting the same numbers
Insertion sort, bubble sort, and selection sort use different steps but produce the same sorted output. Their efficiency can differ; correctness is about producing the expected answer, not being the fastest. section 1.2 section 1.2.1
