We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

Oops i think i misunderstood the test description.
For input
2 -> how many test case will coming
3 -> how many element in the first test case
1 2 3 -> the actual first test case
4 -> how many element in the second test case
1 2 3 4 -> the actual second test case

I thought the 2, 3 and 4 are also test cases :(
But now it's clear to me , thanks #warrior_of_light

## Sherlock and Array

You are viewing a single comment's thread. Return to all comments →

If the given input n (here 3 and 4) is equal to 1, then only we have to print yes.

Oops i think i misunderstood the test description.

For input

2 -> how many test case will coming

3 -> how many element in the first test case

1 2 3 -> the actual first test case

4 -> how many element in the second test case

1 2 3 4 -> the actual second test case

I thought the 2, 3 and 4 are also test cases :(

But now it's clear to me , thanks #warrior_of_light

If n == 1, then definitely answer is YES, for n > 1, you have to check.