diff --git a/stacks_queues/n_stacks/n_stacks_challenge.ipynb b/stacks_queues/n_stacks/n_stacks_challenge.ipynb index 545ddc3..971e560 100644 --- a/stacks_queues/n_stacks/n_stacks_challenge.ipynb +++ b/stacks_queues/n_stacks/n_stacks_challenge.ipynb @@ -43,6 +43,8 @@ "* Does popping from an empty stack result in an exception?\n", " * Yes\n", "* Can we assume the user passed in stack index is valid?\n", + " * Yes\n", + "* Can we assume this fits memory?\n", " * Yes" ] }, diff --git a/stacks_queues/n_stacks/n_stacks_solution.ipynb b/stacks_queues/n_stacks/n_stacks_solution.ipynb index acdbe6a..47a6cd3 100644 --- a/stacks_queues/n_stacks/n_stacks_solution.ipynb +++ b/stacks_queues/n_stacks/n_stacks_solution.ipynb @@ -42,6 +42,8 @@ "* Does popping from an empty stack result in an exception?\n", " * Yes\n", "* Can we assume the user passed in stack index is valid?\n", + " * Yes\n", + "* Can we assume this fits memory?\n", " * Yes" ] }, @@ -118,8 +120,8 @@ " def __init__(self, num_stacks, stack_size):\n", " self.num_stacks = num_stacks\n", " self.stack_size = stack_size\n", - " self.stack_pointers = [-1] * num_stacks\n", - " self.stack_array = [None] * num_stacks * stack_size\n", + " self.stack_pointers = [-1] * self.num_stacks\n", + " self.stack_array = [None] * self.num_stacks * self.stack_size\n", "\n", " def abs_index(self, stack_index):\n", " return stack_index * self.stack_size + self.stack_pointers[stack_index]\n",