Question: python3. ray, shiv and ansh are conducting a survey for a group of people. the survey is only meant for twins but there certain people

python3.

ray, shiv and ansh are conducting a survey for a group of people. the survey is only meant for twins but there certain people who are not twins and wanting to take part in the survey.

write an algo to help them identifythe person from the given input who is not a twin

INPUT:

first line of input consists of an integer - inputArr_size, representing the number of entries in the array (N). the next line consists of N space separated integer elements in the array.

OUTPUT:

print the smallest value of the person who is not a twin from the given arrary of elements

NOTE:

if everyone present is a twin, then return -1

EXAMPLES:

input 7

1 1 2 3 3 4 4

output 2

"""

inputArr, represents the given array of element of size inputArr_size.

"""

def funcTwins(inputArr):

# Write your code here

return

def main():

#input for inputArr

inputArr = []

inputArr_size = int(input())

inputArr = list(map(int,input().split()))

result = funcTwins(inputArr)

print(result)

if __name__ == "__main__":

main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!