+ 2
Let's say you have a list of N+1 integers between 1 and N. You know there's at least one duplicate, but there might be more.
Let's say you have a list of N+1 integers between 1 and N. You know there's at least one duplicate, but there might be more. For example, if N=3, your list might be 3, 1, 1, 3 or it might be 1, 3, 2, 2. Print out a number that appears in the list more than once. (That is, in the first example, you can print '1' or '3' -- you don't have to print both.)
2 Antworten
+ 3
@saikumar
look- a solution with a filter function
https://code.sololearn.com/c9hW2jsxWSUJ/?ref=app
0
How do I type on my keyboard?