Repository navigation
Add and Fix testcases for all list-1 Problems #163
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
Changes from all commits
bb32390
43a262e
34daa9d
1ac4efe
450015c
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,5 +1,5 @@ | ||
| from typing import List | ||
|
|
||
| def biggerTwo(a: List[int], b: List[int]) -> List[int]: | ||
| def bigger_two(a: List[int], b: List[int]) -> List[int]: | ||
| # Your code here | ||
| pass |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,5 +18,29 @@ | |
| { | ||
| "input": [[2]], | ||
| "output": false | ||
| }, | ||
| { | ||
| "input": [[0]], | ||
| "output": false | ||
| }, | ||
| { | ||
| "input": [[100, 3]], | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about a number that contains 2 or 3 such as [20, 30] or [22, 300]?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added it! |
||
| "output": false | ||
| }, | ||
| { | ||
| "input": [[-2, -2]], | ||
| "output": false | ||
| }, | ||
| { | ||
| "input": [[-3, -3]], | ||
| "output": false | ||
| }, | ||
| { | ||
| "input": [[20, 30]], | ||
| "output": false | ||
| }, | ||
| { | ||
| "input": [[22, 33]], | ||
| "output": false | ||
| } | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from typing import List | ||
|
|
||
| def double23(nums: List[int]) -> bool: | ||
| def double_23(nums: List[int]) -> bool: | ||
| # Your code here | ||
| pass |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from typing import List | ||
|
|
||
| def fix23(nums: List[int]) -> List[int]: | ||
| def fix_23(nums: List[int]) -> List[int]: | ||
| # Your code here | ||
| pass |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,5 +18,9 @@ | |
| { | ||
| "input": [[42]], | ||
| "output": [42, 42] | ||
| }, | ||
| { | ||
| "input": [[-1, -2, -3]], | ||
| "output": [-1, -3] | ||
| } | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,16 @@ | ||
| [ | ||
| { | ||
| "input": [0], | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good check |
||
| "output": [] | ||
| }, | ||
| { | ||
| "input": [1], | ||
| "output": [0] | ||
| }, | ||
| { | ||
| "input": [2], | ||
| "output": [0, 1] | ||
| }, | ||
| { | ||
| "input": [5], | ||
| "output": [0, 1, 1, 2, 3] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from typing import List | ||
|
|
||
| def maxOfThree(nums: List[int]) -> int: | ||
| def max_of_three(nums: List[int]) -> int: | ||
| # Your code here | ||
| pass |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from typing import List | ||
|
|
||
| def plusTwo(a: List[int], b: List[int]) -> List[int]: | ||
| def plus_two(a: List[int], b: List[int]) -> List[int]: | ||
| # Your code here | ||
| pass |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,5 +18,13 @@ | |
| { | ||
| "input": [[2, 4, 6, 8, 10, 12]], | ||
| "output": [6, 8] | ||
| }, | ||
| { | ||
| "input": [[9, 8, 7, 6, 5, 4, 3, 2]], | ||
| "output": [6, 5] | ||
| }, | ||
| { | ||
| "input": [[-2, -1, 0, 1]], | ||
| "output": [-1, 0] | ||
| } | ||
| ] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Strange that this exercise is called return-middle-two but the problem is called middleTwo
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed that too, one of them is not even used. Maybe we can make them seperate questions instead |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from typing import List | ||
|
|
||
| def middleTwo(nums: List[int]) -> List[int]: | ||
| def middle_two(nums: List[int]) -> List[int]: | ||
| # Your code here | ||
| pass |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from typing import List | ||
|
|
||
| def start1(a: List[int], b: List[int]) -> int: | ||
| def start_1(a: List[int], b: List[int]) -> int: | ||
| # Your code here | ||
| pass |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from typing import List | ||
|
|
||
| def swapEnds(nums: List[int]) -> List[int]: | ||
| def swap_ends(nums: List[int]) -> List[int]: | ||
| # Your code here | ||
| pass |
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.
Good idea checking negatives!