Time complexity of determining whether two elements are adjacent in an adjacency list

前端 未结 0 551
误落风尘
误落风尘 2021-01-14 05:09

I think the time complexity of determining whether two vertices, v and u , are adjacent is O(max(deg(v), deg(u)) + 1), however, my solution says min instead of max. Could so

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