Compute minimum peak

1. apply pseudo code
2. create compute_map and node_mem in new method
remove that line. Those variable aren't global, but scoped variable in the enclusing scope.

global variable are variable defined at the top level of a file.