M
M
MadMax902017-03-30 11:16:08
Pascal
MadMax90, 2017-03-30 11:16:08

Find an error in the algorithm for sorting an array by dividing in half?

Sandbox https://jsbin.com/yucawajehi/edit?js,console,output
Pseudocode in the picture.
dbc33da6b2dc47cfa3f2a738f53c93a5.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2017-03-30
@MadMax90

l=m++instead l=m+1
of And break is not needed, as already written above.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question