linkedlist (1) 썸네일형 리스트형 [해커랭크] Cycle Detection [JAVA] 문제링크: www.hackerrank.com/challenges/detect-whether-a-linked-list-contains-a-cycle/problem Cycle Detection | HackerRank Given a pointer to the head of a linked list, determine whether the linked list loops back onto itself www.hackerrank.com 처음에 문제를 보고 입력값 범위가 안주어져서 어떻게 풀어야하나 싶었다. 적당한 값으로 갱신하면서 탐색중에 갱신된 그 값을 발견할 경우 싸이클이 있다고 판단해봤는데 통과됐다. 잘못됐다고 생각하고 다른 사람의 풀이를 참고했더니 창의적인 아이디어가 있었다. *잘못된 풀이 // Compl.. 이전 1 다음