Meeting Rooms 2 LINTCODE PROBLEM

Problem link:
https://www.lintcode.com/problem/919/description

I have implemented my algorithms but getting some compiler error can u plz help me with code
My code>>>

hello @joshisanjay8467

make ur comparator static and then try

okay but sometimes without using static keyword my comparator worked can u plz explain this a little

no u might not be dealing inside classes.
sort function is not any member function so it can never call a member function that is the reason we need to make the comprator static.

okay bhaiya will remember this thankyou !