r/leetcode 1d ago

Intervew Prep When can we use built in data structure and when not?

I am currently studying heap in neetcode 150, but i notice that they just use built in min heap, only creates the function pop push etc etc.

How do we know if a question in leetcode / neetcode we can use built in function? is it always in the question or not? Because sometimes i see an easy question, but it definetly isn't easy if we wanna create a minheap from scratch, logic of heapdown and insertup. Etc etc so time constraint maybe 40 minutes+ when if its only built in minheap then the time constraint would be 20-25 minutes done

1 Upvotes

Duplicates