Can an algorithm be 'wrong' even if the code runs?

Asked by kemiadewale · 6 months ago

1 Answer

31
amorebise · 6 months ago Top Answer

Oh, absolutely! This is called a Logic Error. It's like following a recipe perfectly but accidentally using salt instead of sugar. The cake 'runs' (it bakes), but it tastes terrible!

These are the hardest bugs to find because the computer doesn't tell you anything is wrong. You have to check the output yourself to make sure it's what you expected.

Log in to add a comment.