-
Notifications
You must be signed in to change notification settings - Fork 27
Elso hazi #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Elso hazi #15
Conversation
basic/list2.py
Outdated
for item in nums: | ||
if item not in l: | ||
l.append(item) | ||
return l |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nem egeszen, mit dondosz, jo eredmenyt kapnal mondjuk [1,2,3,4,4,1] listara?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javitottam. Az altalad megadott inputokra a kimenet [1,2,3,4,1]
while j < len(list2): | ||
l.append(list2[j]) | ||
j += 1 | ||
#vagy return sorted(list1 + list2) kicsit rovidebb...:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rovidebb, de nem mukodik linearis idoben ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mondjuk az igaz, viszont amivel megoldottam, az O(n)-es.
No description provided.