Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MolinDeng/Princeton-algs4
/ moves
Method
moves
LabEnv/04Lab/Solver.java:70–73 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
68
69
// min number of moves to solve initial board; -1 if unsolvable
70
public
int
moves() {
71
if
(!solvable)
return
-1;
72
return
moves;
73
}
74
75
76
// sequence of boards in a shortest solution; null if unsolvable
Callers
2
main
Method · 0.95
main
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected