Re:Data structures and algorithms I actually used while work...
by ajuc on Wednesday July 15, 2020 @07:36AM
(#23843778)
> What are the practical applications of recursion though ?
Traversing and transforming nested data structures.
Just last month I had to write code that maps flat data from one system into a nested structure required by another system.
We wrote mappings as map literals and the code traverses them creating a new instance of the map filling the leaves with data from the input row and running some business logic on it.
What are the practical applications of recursion though ? Other than sorting and DFS ( well even DFS can be done iteratively with stacks ). I'll be curious to know.
I find testing for HashTable/HashMap knowledge to be far more practical than testing for LinkedLists simply because you can't escape HashTables in today's world.