Bug Report for https://neetcode.io/problems/dynamicArray
Issue: Instructions mismatch, it requires more context, what does end of array mean?
Instruction in the question:
void pushback(int n) will push the element n to the end of the array.
Solution for the question
# Insert n in the last position of the array
def pushback(self, n: int) -> None:
if self.length == self.capacity:
self.resize()
# insert at next empty position
self.arr[self.length] = n
self.length += 1
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Bug Report for https://neetcode.io/problems/dynamicArray
Issue: Instructions mismatch, it requires more context, what does end of array mean?
Instruction in the question:
Solution for the question
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.