Merge pull request #64 from donnemartin/develop

Update linked list constraints
This commit is contained in:
Donne Martin 2016-06-18 22:11:55 -04:00 committed by GitHub
commit ea1bb12a13
12 changed files with 28 additions and 12 deletions

View File

@ -34,6 +34,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\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", "* Do we expect the return to be in reverse order too?\n",
" * Yes\n", " * Yes\n",
"* What if one of the inputs is None?\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", "* How large are these numbers--can they fit in memory?\n",
" * Yes\n", " * Yes\n",
"* Can we assume we already have a linked list class that can be used for this problem?\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" " * Yes"
] ]
}, },

View File

@ -33,6 +33,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\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", "* Do we expect the return to be in reverse order too?\n",
" * Yes\n", " * Yes\n",
"* What if one of the inputs is None?\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", "* How large are these numbers--can they fit in memory?\n",
" * Yes\n", " * Yes\n",
"* Can we assume we already have a linked list class that can be used for this problem?\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" " * Yes"
] ]
}, },

View File

@ -34,6 +34,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\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", "* 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", " * Yes\n",
"* Can we assume we already have a linked list class that can be used for this problem?\n", "* Can we assume we already have a linked list class that can be used for this problem?\n",

View File

@ -33,6 +33,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\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", "* 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", " * Yes\n",
"* Can we assume we already have a linked list class that can be used for this problem?\n", "* Can we assume we already have a linked list class that can be used for this problem?\n",

View File

@ -34,6 +34,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\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", "* Can we assume k is a valid integer?\n",
" * Yes\n", " * Yes\n",
"* If k = 0, does this return the last element?\n", "* If k = 0, does this return the last element?\n",

View File

@ -33,6 +33,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\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", "* Can we assume k is a valid integer?\n",
" * Yes\n", " * Yes\n",
"* If k = 0, does this return the last element?\n", "* If k = 0, does this return the last element?\n",

View File

@ -34,10 +34,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\n", "\n",
"* Is this a singly or doubly linked list?\n", "* Can we assume this is a non-circular, singly linked list?\n",
" * Singly\n", " * Yes\n",
"* Is this a circular list?\n",
" * No\n",
"* Do we keep track of the tail or just the head?\n", "* Do we keep track of the tail or just the head?\n",
" * Just the head\n", " * Just the head\n",
"* Can we insert None values?\n", "* Can we insert None values?\n",

View File

@ -33,10 +33,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\n", "\n",
"* Is this a singly or doubly linked list?\n", "* Can we assume this is a non-circular, singly linked list?\n",
" * Singly\n", " * Yes\n",
"* Is this a circular list?\n",
" * No\n",
"* Do we keep track of the tail or just the head?\n", "* Do we keep track of the tail or just the head?\n",
" * Just the head\n", " * Just the head\n",
"* Can we insert None values?\n", "* Can we insert None values?\n",

View File

@ -34,6 +34,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\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", "* Do we expect the function to return a new list?\n",
" * Yes\n", " * Yes\n",
"* Can we assume the input x is valid?\n", "* Can we assume the input x is valid?\n",

View File

@ -33,6 +33,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\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", "* Do we expect the function to return a new list?\n",
" * Yes\n", " * Yes\n",
"* Can we assume the input x is valid?\n", "* Can we assume the input x is valid?\n",

View File

@ -34,8 +34,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\n", "\n",
"* Is this a singly or doubly linked list?\n", "* Can we assume this is a non-circular, singly linked list?\n",
" * Singly\n", " * Yes\n",
"* Can you insert None values in the list?\n", "* Can you insert None values in the list?\n",
" * No\n", " * No\n",
"* Can we assume we already have a linked list class that can be used for this problem?\n", "* Can we assume we already have a linked list class that can be used for this problem?\n",

View File

@ -34,8 +34,8 @@
"source": [ "source": [
"## Constraints\n", "## Constraints\n",
"\n", "\n",
"* Is this a singly or doubly linked list?\n", "* Can we assume this is a non-circular, singly linked list?\n",
" * Singly\n", " * Yes\n",
"* Can you insert None values in the list?\n", "* Can you insert None values in the list?\n",
" * No\n", " * No\n",
"* Can we assume we already have a linked list class that can be used for this problem?\n", "* Can we assume we already have a linked list class that can be used for this problem?\n",