-
Notifications
You must be signed in to change notification settings - Fork 27
Elso hazi #14
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 #14
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/usr/bin/python -tt | ||
| # !/usr/bin/python -tt | ||
| # Copyright 2010 Google Inc. | ||
| # Licensed under the Apache License, Version 2.0 | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
@@ -13,17 +13,15 @@ | |
| # so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or | ||
| # modify the passed in list. | ||
| def remove_adjacent(nums): | ||
| # +++your code here+++ | ||
| return | ||
| return list(set(nums)) | ||
|
||
|
|
||
|
|
||
| # E. Given two lists sorted in increasing order, create and return a merged | ||
| # list of all the elements in sorted order. You may modify the passed in lists. | ||
| # Ideally, the solution should work in "linear" time, making a single | ||
| # pass of both lists. | ||
| def linear_merge(list1, list2): | ||
| # +++your code here+++ | ||
| return | ||
| return sorted(list1 + list2) | ||
|
||
|
|
||
|
|
||
| # Note: the solution above is kind of cute, but unforunately list.pop(0) | ||
|
|
@@ -62,4 +60,4 @@ def main(): | |
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| main() | ||
| main() | ||
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.
wow :) Klassz megoldas, bar egy kicsit lassu. https://wiki.python.org/moin/HowTo/Sorting
key functions alatt talasz elegansabb megoldast.