Hi, am working on binary trees, and wanted to make a little program that takes the user through a series of questions. I was thinking of using the well-known decision tree of how to deal deal with a mess-up: Did you break it? Did anyone see you? Can you blame it on anyone else? I cannot quite remember it. Does anyone know the questions or have the URL of a site that shows it? Would be very grateful indeed!
Originally posted by kiennjal shah: is this something popular that is related to binary trees?
No, binary trees specifically involve sorting the values in the tree for faster lookup, insertion, etc.
A decision tree instead labels each edge (connection from one node to another). A node has a question (decision) with multiple edges leading to other nodes. Once you have an answer to the question, you navigate the edge with the matching answer.
No thanks. We have all the government we need. This tiny ad would like you to leave now: