mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Tweaked constraints section discussion.
This commit is contained in:
parent
d236679338
commit
fac7bbb1be
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* For simplicity, are the keys integers only?\n",
|
||||
" * Yes\n",
|
||||
"* For collision resolution, can we use linked lists?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* For simplicity, are the keys integers only?\n",
|
||||
" * Yes\n",
|
||||
"* For collision resolution, can we use linked lists?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can I assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can I assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can you assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can you assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can you assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can you assume the string is ASCII?\n",
|
||||
" * Yes\n",
|
||||
" * Note: Unicode strings could require special handling depending on your language\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Do you expect the return to be in reverse order too?\n",
|
||||
" * Yes\n",
|
||||
"* What if one of the inputs is None?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Do you expect the return to be in reverse order too?\n",
|
||||
" * Yes\n",
|
||||
"* What if one of the inputs is None?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\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,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\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,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is this a singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume we are always passed a circular linked list?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is this a singly linked list?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume we are always passed a circular linked list?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume k is a valid integer?\n",
|
||||
" * Yes\n",
|
||||
"* If k = 0, does this return the last element?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume k is a valid integer?\n",
|
||||
" * Yes\n",
|
||||
"* If k = 0, does this return the last element?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Is this a circular list?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Is this a circular list?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a single character or number a palindrome?\n",
|
||||
" * No\n",
|
||||
"* Can we assume we already have a linked list class that can be used for this problem?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a single character or number a palindrome?\n",
|
||||
" * No\n",
|
||||
"* Can we assume we already have a linked list class that can be used for this problem?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we create additional data structures?\n",
|
||||
" * Yes\n",
|
||||
"* Do you expect the function to return a new list?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we create additional data structures?\n",
|
||||
" * Yes\n",
|
||||
"* Do you expect the function to return a new list?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Can you insert None values in the list?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Can you insert None values in the list?\n",
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"See the [HackerRank problem page](https://www.hackerrank.com/challenges/maximizing-xor)."
|
||||
]
|
||||
},
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"See the [HackerRank problem page](https://www.hackerrank.com/challenges/maximizing-xor)."
|
||||
]
|
||||
},
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"See the [HackerRank problem page](https://www.hackerrank.com/challenges/utopian-tree)."
|
||||
]
|
||||
},
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"See the [HackerRank problem page](https://www.hackerrank.com/challenges/utopian-tree)."
|
||||
]
|
||||
},
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* None"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* None"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a naiive solution sufficient?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a naiive solution sufficient?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a naiive solution sufficient?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a naiive solution sufficient?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a naiive solution sufficient (ie not in-place)?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a naiive solution sufficient (ie not in-place)?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a naiive solution sufficient (ie not stable, not based on a heap)?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is a naiive solution sufficient (ie not stable, not based on a heap)?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume we already have a stack class that can be used for this problem?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume we already have a stack class that can be used for this problem?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Are the stacks and array a fixed size?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Are the stacks and array a fixed size?\n",
|
||||
" * Yes"
|
||||
]
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Do you expect the methods to be enqueue and dequeue?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume we already have a stack class that can be used for this problem?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Do you expect the methods to be enqueue and dequeue?\n",
|
||||
" * Yes\n",
|
||||
"* Can we assume we already have a stack class that can be used for this problem?\n",
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* If there is one item in the list, do you expect the first and last pointers to both point to it?\n",
|
||||
" * Yes\n",
|
||||
"* If there are no items on the list, do you expect the first and last pointers to be None?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* If there is one item in the list, do you expect the first and last pointers to both point to it?\n",
|
||||
" * Yes\n",
|
||||
"* If there are no items on the list, do you expect the first and last pointers to be None?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume we already have a stack class that can be used for this problem?\n",
|
||||
" * Yes\n",
|
||||
"* If a stack becomes full, we should automatically create one?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume we already have a stack class that can be used for this problem?\n",
|
||||
" * Yes\n",
|
||||
"* If a stack becomes full, we should automatically create one?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* When sorted, should the largest element be at the top or bottom?\n",
|
||||
" * Top\n",
|
||||
"* Can you have duplicate values like 5, 5?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* When sorted, should the largest element be at the top or bottom?\n",
|
||||
" * Top\n",
|
||||
"* Can you have duplicate values like 5, 5?\n",
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* None"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* None"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume this is a stack of ints?\n",
|
||||
" * Yes\n",
|
||||
"* If we call this function on an empty stack, can we return max int?\n",
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Can we assume this is a stack of ints?\n",
|
||||
" * Yes\n",
|
||||
"* If we call this function on an empty stack, can we return max int?\n",
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is it foo or bar?\n",
|
||||
" * foo"
|
||||
]
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
"*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
|
||||
"\n",
|
||||
|
||||
"* Is it foo or bar?\n",
|
||||
" * foo"
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user