bell notificationshomepageloginNewPostedit profile

Topic : Re: What is the difference between method and algorithm? Could you please let me know the difference between method and algorithm? Can a method be computed into an algorithm? Can an algorithm be based - selfpublishingguru.com

10% popularity

From the perspective of computing, a method is typically a small, named (and thus callable) set of instructions to produce some result. The method can be simple or complex. It can be an algorithm. An algorithm also produces a result but typically is more complex and more rigorous. An algorithm may be implemented as a single method or a large set of inter-related methods.

A simple method might be Min(A, B) which returns the smaller of the two values. You could call the "if A less than B then return A else return B" an algorithm. You would be right but you would also get funny (and dismissive) looks from most computer scientists.

An algorithm might be the logic to detect an edge in region of a picture. In a well-written algorithm, there would be many small (and thus testable) methods stitched together to accomplish the detection.

This is a fuzzy set of terms. That said, there may be some precise definitions somewhere but I worked as a software engineer for decades without ever needing them.


Load Full (0)

Login to follow topic

More posts by @Phylliss352

0 Comments

Sorted by latest first Latest Oldest Best

Back to top