Implementing shortest path as a method vs. as a separate function

前端 未结 0 1020
Happy的楠姐
Happy的楠姐 2020-12-11 04:39

Does it make more sense to implement a shortest path algorithm as a method of the Graph class or a separate function which takes the graph as a parameter?

Motivation:

相关标签:
回答
  • 消灭零回复
提交回复
热议问题