React

[[0,1,1],[0,2,2],[1,2,5],[1,3,1],[2,3,8]]

n
4
return
4