Jump to content

Pizzas Topped with Pizzas


SeanMike

Recommended Posts

Because recursion implies an infinite or multiple series, not just a single parent/child relationship. This is the base case for recursion, but there's no recursion step unless the mini pizzas also have mini pizzas.

Consider the base case: "pizza consists of pizza-topping (1 or more) fit onto a crust".

Some additional base cases, "single parent/child relationships" as you refer to, might include:

"cheese is a pizza-topping"

"spinach is a pizza-topping"

"tomato sauce is a pizza-topping"

The recursive step here is "pizza is a pizza-topping".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...