Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Andre Abtahi
Poor validation prior to pushing will lead to crashing code.

Andre Abtahi

May 1, 2024

for the push method, we need to decide wether top points to this new item or if it needs to be swapped out to point to the new item by re routing pointers. Either way a validation check should occur otherwise top is confused type wise given that it's set to None.

0

0

Comments
Comments

On this page