DRW Interview Question

How to make a class in CPP hashable? What is the algorithm for making balance binary tree called.