Tree and graphs algorithms.