CC - 10 - #470
Conversation
Interview Problem : Buy and Sell Stock (BuyAndSellStock2.py)Your response should be comprehensive and helpful for the student to understand their mistakes and learn from them. VERDICT: NEEDS_IMPROVEMENT Interview Problem: Peeking Iterator (PeekingIterator.py)Your solution is almost correct and follows a similar approach to the reference solution. However, there is a critical bug in the Also, in the Another minor point: the variable name To fix the issue, update the def next(self):
if self.peek_val is not None:
to_return = self.peek_val
self.peek_val = None
return to_return
return self.it_.next()With this change, the solution will handle all integers correctly. VERDICT: NEEDS_IMPROVEMENT |
No description provided.