BairesDev interview question

Q: How do you implement a decision tree training algorithm?