Compute minimum peak

1. apply pseudo code
2. create compute_map and node_mem in new method
Here you can just save the current order in a variable that you declare before the loop.  No need to play with indexes and such.