how to determine maximum route cost in a n high numeric pyramid

前端 未结 6 1368
小鲜肉
小鲜肉 2021-02-09 06:15

I\'ve got a numeric pyramid like this

       7
      4 8
     1 8 9
    2 4 6 7
   4 6 7 4 9
  4 9 7 3 8 8

routes: 32

every number indexed by

6条回答
  •  无人及你
    2021-02-09 06:30

    I suggest you look at Dijkstra's Algorithm and A*.

    I believe Dijkstra's is more accurate than A*, but slower.

提交回复
热议问题