While designing an algorithm, we must consider the subsequent factors -
1. Modularity-If a big problem can be fluently broken down into lower bones, it facilitates modularity
2. Correctness-The analysis of the problem statement and accordingly the algorithm should be correct. The algorithm should also work rightly for all possible test cases of the problem at hand. A test case is nothing but a specification of inputs, executing conditions, testing procedure, and anticipated results, which can be developed from the problem statement itself
3. Maintainability-The algorithm should be designed in such a way that it should be easy to maintain and if we wish to upgrade it at some point, we should be suitable to do so without making major changes
4. Functionality-The way an algorithm should successfully break a real-world problem
5. Developer-friendly-It should be fluently understood by programmers
6. Simplicity- It should be the simplest possible result of a problem. By simplicity, we relate to the fact that the algorithm should have the best-case time complexity. The approach of the algorithm should be simple yet it should produce the asked results in a time-effective manner, keeping both- time and space complications in mind
7. Extensible-It should be extensible i.e. the algorithm should grease reusability. In other words, other programs should be suitable to exercise it or extend for their own problem statement too
.