Problem: given 2 algorithms to solve the same problem, how to determine which algorithm is right?

Solution 1: Implement both algorithms and test against some predefined test cases and see which one takes fewer resources like time.

problems with solution 1:

Khera Shanu

coder, human, confused

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store