About the access specifiers of 2 fns

why have we declared compare and heapify functions as private members of the class?What if we declare them as public?

hello @Senjuti256

there are three access modifier we use->
public, protected ,private

public-> we use this when we want to make any function /memeber variable publicly accessible from outside the class

private->we use this when we want to make any function /memeber variable accessible only from inside the class.

it will not have any effect in terms of logic.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.