When the university just learned to program, there is a very classic Word program = data structure + algorithm
There is a further understanding today.
Scene:
1. Current situation
(1) There is a ready-made packaged paging component that returns the result is Page. The type is: Page. Includes page paging information, data list Type.
(2) queried a list of data midresult. The type is list<map<string,object>>.
2. Desired Results
Now you want to process the page Midresult two result set. Returns the Page.
3, Solve the problem
The first thing to tangle with is what type of data is used to store it. With list or map<string,object> or list<map<string,object>>. At this point, the data structure is Used.
The traversal processes two sets, which can also be said to be algorithms.
4. Summary
In this way, it becomes perfect to withdraw the program = data structure + ALGORITHM.
Finally: self-thought program = data structure + algorithm is the essence of the realization of local functions! yeah!
First turn java essay (a) program = data structure + algorithm