0

Check if a group of numbers at the start and end of a given array are same

I am to make a code that if the last typed integer existed in the first group of integers, then print "here". That is the input format is, The first line contains the size of the array/list. The next lines contain the integers. The last line contains an integer to be searched. example1: Input: 2 5 8 5 Desired output: here Example2: Input: 5 17 15 8 4 20 15 Output: here Example3: Input: 3 6 11 9 2 Output: Meh How do I code to search for that similar number? Or, what should I do to get my desired output? https://code.sololearn.com/cA16A0a35a12

8th Jul 2021, 7:38 AM
Eka
Eka - avatar
3 Réponses
+ 1
Eka You have many mistakes in your code, please review once before post with question. One more suggestion please make your code readable. Now here is your solution: https://code.sololearn.com/cSSpICMXp0XM/?ref=app
8th Jul 2021, 11:11 AM
A͢J
A͢J - avatar
+ 1
I Am "TIME" I added some examples, check it out :D
8th Jul 2021, 10:35 AM
Eka
Eka - avatar
0
Eka Can you give one more example?
8th Jul 2021, 10:22 AM
A͢J
A͢J - avatar