def find_repeat(numbers):
seen = set()
for n in numbers:
if n in seen:
return n
else:
seen.add(n)
return False #if no duplicate found
Instead of returning False, you can also raise an exception. Use this:
raise Exception('custom exception message here')
Your byte size news and commentary from Silicon Valley the land of startup vanities, coding, learn-to-code and unicorn billionaire stories.
Monday, December 11, 2017
Finding Repeats in an Array or a List - Technical Interview in Python Patterns
Practice using Hash map.
Subscribe to:
Post Comments (Atom)
Developing apps for airtable using Airtable Blocks
The airtable smart sheets now has an app platform called Airtable Blocks, which allows developers to add custom code, and build apps quickly...


-
In this downtown startup work space design the designers used fat boy bean bags and an extra wide step tiered staircase to create work space...
-
Can hack schools solve Silicon Valley's talent crunch? The truth about coding bootcamps and the students left behind http://t.co/xXNfqN...
-
This review is updated continuously throughout the program. Yay I just joined the Udacity Nanodegree for Digital Marketing! I am such an Uda...

No comments:
Post a Comment