algs4partI-004: 8puzzle WIP

Calculate manhattan for each Node only once at creation time.

Huge gains in performance.

Before
                                                              delMin()
               filename   N    seconds    insert()          + delMax()         max PQ size
---------------------------------------------------------------------------------------------
=> passed  puzzle20.txt   3     0.25       1510                 898                 614
=> passed  puzzle21.txt   3     0.32       2757                1616                1143
=> passed  puzzle22.txt   3     0.13       3083                1834                1251
=> passed  puzzle23.txt   3     0.24       5373                3190                2185
=> passed  puzzle24.txt   3     0.21       6499                3942                2559
=> passed  puzzle25.txt   3     0.22      11096                6580                4518
=> passed  puzzle26.txt   3     0.12       5316                3190                2128
=> passed  puzzle27.txt   3     0.21      10008                6044                3966
=> passed  puzzle28.txt   3     0.36      24032               14376                9658
=> passed  puzzle29.txt   3     0.26      24616               14818                9800
=> passed  puzzle30.txt   3     0.30      41630               25164               16468
=> passed  puzzle31.txt   3     0.69      53698               32506               21194
=> passed  puzzle34.txt   4     8.51     254199              121660              132541
=> passed  puzzle37.txt   4     3.95     157835               76216               81621
=> passed  puzzle39.txt   4     4.79     152178               74158               78022
=> passed  puzzle41.txt   5     2.60      76862               32948               43916
=> passed  puzzle44.txt   5    10.81     308964              138178              170788
==> 17/17 tests passed

After
                                                              delMin()
               filename   N    seconds    insert()          + delMax()         max PQ size
---------------------------------------------------------------------------------------------
=> passed  puzzle20.txt   3     0.07       1510                 898                 614
=> passed  puzzle21.txt   3     0.05       2757                1616                1143
=> passed  puzzle22.txt   3     0.04       3083                1834                1251
=> passed  puzzle23.txt   3     0.04       5373                3190                2185
=> passed  puzzle24.txt   3     0.04       6499                3942                2559
=> passed  puzzle25.txt   3     0.05      11096                6580                4518
=> passed  puzzle26.txt   3     0.03       5316                3190                2128
=> passed  puzzle27.txt   3     0.05      10008                6044                3966
=> passed  puzzle28.txt   3     0.14      24032               14376                9658
=> passed  puzzle29.txt   3     0.09      24616               14818                9800
=> passed  puzzle30.txt   3     0.08      41630               25164               16468
=> passed  puzzle31.txt   3     0.13      53698               32506               21194
=> passed  puzzle34.txt   4     1.48     254199              121660              132541
=> passed  puzzle37.txt   4     0.34     157835               76216               81621
=> passed  puzzle39.txt   4     0.55     152178               74158               78022
=> passed  puzzle41.txt   5     0.19      76862               32948               43916
=> passed  puzzle44.txt   5     0.94     308964              138178              170788
==> 17/17 tests passed