Day 8 | Write a python code to find the least positive number missing from an array of integers

Опубликовано: 06 Декабрь 2020
на канале: CloudyML
846
16

I was asked this question in one of interview

Post Link:   / akashraj001_day-8-l-data-science-interview...  

Code:
ip=[1,-5,7,-2,-3,0,10,100,3]

arr=list(range(1,len(ip)+1))

d={}

for i in arr:
d[i]=0

for i in ip:
try:
d[i]=d[i]+1
except:
pass

for i in d.keys():
if d[i]==0:
print(i)
break

Join our "AI for All" Assignment Driven Course:

Our 25+ Assignments includes concepts covering all important concepts of Python, Machine Learning, Statistics and SQL, which are used in Industry.

Key offerings:

1. Assignment mode from Day 1.
2. YouTube Content links.
3. Mentors to resolve Assignment queries.
4. Tracking of learner's progress and constant push to complete assignments on time.
5. Course Completion certificate.

Course link: https://www.cloudyml.com/ai4all/
Discount link for YouTube users: https://bit.ly/ai4all-youtube-discount

Discounted Course link: https://www.cloudyml.com/ai-for-all-d...

Key Offerings by AI for All:
1. Nicely curated questions in assignments to cover all important topics of Python, ML, SQL, Statistics and AWS Sagemaker Deployment.
2. Mentors available from 10am to 10pm everyday to resolve assignment related queries.
3. Content(YouTube videos and blogs) collection in structured way to learn all the concepts.
4. Lifetime Access to Assignments and Content collections.
5. Learners tracking and reminders for continuous learnings.
6. Self paced courses.
7. No prior coding experience required.
8. Interview Questions & Answers
9. 10+ Data Science projects that you can put in Resume.
10. Course Completion Certificate.


Смотрите видео Day 8 | Write a python code to find the least positive number missing from an array of integers онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь CloudyML 06 Декабрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 846 раз и оно понравилось 16 людям.