Circular Linked List

easy
1. You are given a singly linkedlist.
  2. You need to check whether it is circular or not.
  3. A linkedlist is said to be circular if tail next points to head of linkedlist.

Input Format

Input has been managed for you

Output Format

Output has been managed for you

Constraints

n<=10^4

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
5 1
 1 2 3 4 5
Output
true
Previous
Addition Of Two Linked List
Next
Sort The Absolute List

Related Questions