β Good circular array (Contest)
Good circular array easy
```java
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
// Your code here
Scanner sc = new Scanner(System.in);
int n= sc.nextInt();
int[] arr= new int[n];
for(int i=0;i<n;i++){
arr[i]=sc.nextInt();
}
boolean good = true;
if(n%2 == 1){
System.out.println("No");
} else{
for(int i=0;i<n/2;i++){
if(arr[i]!= arr[i+n/2]){
good = false;
break;
}
}
if(good)
System.out.println("Yes");
else
System.out.println("No");
}
}
}
```Last updated