You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is directly checked as if lst[1].
This will give error if index does not exist in lst.
Instead, we need to check if len(lst) >= 2 i.e. whether 1st element exists or not.
The text was updated successfully, but these errors were encountered:
Python/MaxHeap.py
Line 18 in ba3e6e6
It is directly checked as if lst[1].
This will give error if index does not exist in lst.
Instead, we need to check if len(lst) >= 2 i.e. whether 1st element exists or not.
The text was updated successfully, but these errors were encountered: