Recall that a cycle in an undirected graph is a sequence of distinct vertices (21,0, ---, Uk) with k > 3 such that the edges {01, 22}, {U2, U3},..., {Uk-1, Uk} and also {vk, v1} all exist. For example, in Figure 1 (A,B,C) form a cycle. 1. Design an algorithm which given an undirected connected graph determines whether the graph has a cycle. If the graph has |VI vertices and E| edges, your algorithm should run in O(IVI+El) time. 2. Justify the correctness and run-time of your algorithm.