mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Merge pull request #64 from donnemartin/develop
Update linked list constraints
This commit is contained in:
commit
ea1bb12a13
|
@ -34,6 +34,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Do we expect the return to be in reverse order too?\n",
|
||||
" * Yes\n",
|
||||
"* What if one of the inputs is None?\n",
|
||||
|
@ -41,6 +43,8 @@
|
|||
"* How large are these numbers--can they fit in memory?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume we already have a linked list class that can be used for this problem?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume this fits in memory?\n",
|
||||
" * Yes"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Do we expect the return to be in reverse order too?\n",
|
||||
" * Yes\n",
|
||||
"* What if one of the inputs is None?\n",
|
||||
|
@ -40,6 +42,8 @@
|
|||
"* How large are these numbers--can they fit in memory?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume we already have a linked list class that can be used for this problem?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume this fits in memory?\n",
|
||||
" * Yes"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* What if the final node is being deleted, for example a single node list? Do we make it a dummy with value None?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume we already have a linked list class that can be used for this problem?\n",
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* What if the final node is being deleted, for example a single node list? Do we make it a dummy with value None?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume we already have a linked list class that can be used for this problem?\n",
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume k is a valid integer?\n",
|
||||
" * Yes\n",
|
||||
"* If k = 0, does this return the last element?\n",
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume k is a valid integer?\n",
|
||||
" * Yes\n",
|
||||
"* If k = 0, does this return the last element?\n",
|
||||
|
|
|
@ -34,10 +34,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Is this a circular list?\n",
|
||||
" * No\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Do we keep track of the tail or just the head?\n",
|
||||
" * Just the head\n",
|
||||
"* Can we insert None values?\n",
|
||||
|
|
|
@ -33,10 +33,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Is this a circular list?\n",
|
||||
" * No\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Do we keep track of the tail or just the head?\n",
|
||||
" * Just the head\n",
|
||||
"* Can we insert None values?\n",
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Do we expect the function to return a new list?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume the input x is valid?\n",
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Do we expect the function to return a new list?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume the input x is valid?\n",
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Can you insert None values in the list?\n",
|
||||
" * No\n",
|
||||
"* Can we assume we already have a linked list class that can be used for this problem?\n",
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Can we assume this is a non-circular, singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Can you insert None values in the list?\n",
|
||||
" * No\n",
|
||||
"* Can we assume we already have a linked list class that can be used for this problem?\n",
|
||||
|
|
Loading…
Reference in New Issue
Block a user