Update linked list constraints

Specify singly linked list, non circular.  Also specify the solution fits in memory.
This commit is contained in:
Donne Martin 2016-06-18 13:55:29 -04:00
parent dcfde9586e
commit 54b5e12230
12 changed files with 28 additions and 12 deletions

View File

@ -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"
]
},

View File

@ -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"
]
},

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",