Grokking Meta Coding Interview
Ask Author
Back to course home

0% completed

Vote For New Content
Confusion - Python

k

Jun 25, 2023

  1. Generally def _ _ lt _ _(self, other) is used for "Less than". However, in definition it has used ">" sign (Which is used for Greater than)
  2. How will maxHeap will work? since we are pushing object of class Point. How will heap sort it?

2

0

Comments
Comments
H
hn200000 2 years ago

the _ _ lt _ _ method is not run. you can delete that method from the solution. The maxHeap uses the first element in the tuple to compare, so it doesn't run the custom lt method

On this page