Re: [闲聊] 每日leetcode

楼主: smart0eddie (smart0eddie)   2024-06-27 08:17:46
1791. Find Center of Star Graph
There is an undirected star graph consisting of n nodes labeled from 1 to n.
A star graph is a graph where there is one center node and exactly n - 1
edges that connect the center node with every other node.
原本想说这题很简单啊
所有node算一下谁的edge最多
然后时间跟别人比慢的要死
一看答案
靠北 直接取两个edge 共通的node就好了
泥板只剩我不看答案连easy都不会了

Links booklink

Contact Us: admin [ a t ] ucptt.com