Decision-based processing
Sequential processing
Iterative processing with variable update
Randomized processing
Syntax error
Logical error
Compilation error
Infinite loop
1 to n
2 to n-1
1 to √n
2 to √n
Counter
Factorial value
Input number
Loop limit
Iteration and sequential arithmetic
Recursion
Decision-only processing
Sorting
A is preferable because it terminates
B is preferable because correctness is fundamental
Both satisfy algorithm correctness
Both violate essential properties of algorithms