From Kelvin Murphy's review on Algorithms (4th Edition) by Sedgewick and Wayne
For data structures, it is obviously natural to use classes, but they also adopt this approach for many algorithms, esp. graph processing ones. This allows the algo to do pre-processing and to store internal state, and then to provide a service to the caller. This is more general than the standard stateless functional view of algorithms.
What does "the standard statelessthe "stateless functional view of algorithms" mean?
The viewviews I have read from some algorithm books are based on states of objects. So I think that the standard view of algorithms are based on states, correct?
Thanks.