Skip to main content
deleted 10 characters in body; edited tags
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

Below is a Go solution using uniform-cost search to build a search tree. It works on the toy small problem but on the 80x80 matrix it runs out of space. Could anyone that is up for a challenge help improve this still using this solution.? By the way, this is the first program of any consequence I have written in Go. and I am try to learn the language.

Below is a Go solution using uniform-cost search to build a search tree. It works on the toy small problem but on the 80x80 matrix it runs out of space. Could anyone that is up for a challenge help improve this still using this solution. By the way, this is the first program of any consequence I have written in Go. I am try to learn the language

Below is a Go solution using uniform-cost search to build a search tree. It works on the toy small problem but on the 80x80 matrix it runs out of space. Could anyone that is up for a challenge help improve this still using this solution? By the way, this is the first program of any consequence I have written in Go and I am try to learn the language.

Included the problem statement
Source Link
200_success
  • 144.1k
  • 22
  • 188
  • 473

Golang solution to Project Euler problem #81 (min path through a matrix)

Project Euler problem 81 asks:

In the 5 by 5 matrix below,

131   673 234 103 18
201   96  342 965 150
630   803 746 422 111
537   699 497 121 956
805   732 524 37  331

the minimal path sum from the top left to the bottom right, by only moving to the right and down, is

131 → 201 → 96 → 342 → 746 → 422 → 121 → 37 → 331

and is equal to 2427.

Find the minimal path sum, in matrix.txt (right click and 'Save Link/Target As...'), a 31K text file containing a 80 by 80 matrix, from the top left to the bottom right by only moving right and down.

Below is a Go solution to the problem 81 in project euler using uniform cost searchuniform-cost search to build a search tree. It works on the toy small problem but on the 80x80 matrix it runs out of space. Could anyone that is up for a challenge help improve this still using this solution. By the way, this is the first program of any consequence I have written in Go. I am try to learn the language

Golang solution to Project Euler problem #81

Below is a Go solution to the problem 81 in project euler using uniform cost search to build a search tree. It works on the toy small problem but on the 80x80 matrix it runs out of space. Could anyone that is up for a challenge help improve this still using this solution. By the way, this is the first program of any consequence I have written in Go. I am try to learn the language

Golang solution to Project Euler #81 (min path through a matrix)

Project Euler problem 81 asks:

In the 5 by 5 matrix below,

131   673 234 103 18
201   96  342 965 150
630   803 746 422 111
537   699 497 121 956
805   732 524 37  331

the minimal path sum from the top left to the bottom right, by only moving to the right and down, is

131 → 201 → 96 → 342 → 746 → 422 → 121 → 37 → 331

and is equal to 2427.

Find the minimal path sum, in matrix.txt (right click and 'Save Link/Target As...'), a 31K text file containing a 80 by 80 matrix, from the top left to the bottom right by only moving right and down.

Below is a Go solution using uniform-cost search to build a search tree. It works on the toy small problem but on the 80x80 matrix it runs out of space. Could anyone that is up for a challenge help improve this still using this solution. By the way, this is the first program of any consequence I have written in Go. I am try to learn the language

Tweeted twitter.com/#!/StackCodeReview/status/356234117010042880
edited tags
Link
Nakilon
  • 1.3k
  • 7
  • 17
Source Link
cobie
  • 457
  • 3
  • 13
Loading