Given an integer array **Arr**[] and an element **x**. The task is to find if the given element is present in array or not.

**Input:**

First line contains an integer, the number of test cases 'T'. For each test case, first line contains an integer 'N', size of array. The second line contains the elements of the array separated by spaces. Third line contains element to be find in the array.

**Output:**

For each testcase, output a single line containing first index of element to be found in array. If element is not in the array, then print "**-1**" (without quotes).

**Constraints:**

1 <= T <= 100

1 <= N <= 100

1 <= Arr[i] <= 100

**Example:**

**Input:**

1

4

1 2 3 4

3

**Output:**

2

**Explanation:**

**Testcase 1:** There is one test case with array as {1, 2, 3 4} and element to be searched as 3. Since 3 is present at index 2, output is 2.

may55 | 86 |

ashujack | 84 |

aman19 | 82 |

abbatta7 | 75 |

lakshmi_pandey | 74 |

saumitra13325 | 648 |

ashujack | 591 |

aman19 | 562 |

lakshmi_pandey | 546 |

aroma17 | 535 |

blackshadows | 5249 |

akhayrutdinov | 5111 |

Ibrahim Nash | 5087 |

Quandray | 4354 |

sanjay05 | 3668 |

Login to report an issue on this page.