X interview question

Implement decision tree algorithm with python.