【預告】5/13(一)起,第三階段頁面上方功能列以及下方資訊全面更換新版。 前往查看

研究所、轉學考(插大)◆資料結構及演算法題庫

【非選題】
7. (15%) Design a polynomial-time algorithm for the following problem.
 Input: An n-node undirected graph G. 
Output:
 "'Yes', if there is a cycle of length at most n/2 (i.e., a cycle that has at most n/2 nodes) in G;
 "No", otherwise.
***Please give the high-level idea of your algorithm and explain why it has polynomial running time. ***