ideal algorithms to demonstrate overfitting or underfitting
Another example you could use is the separation boundaries in decision trees classification problem. In the picture below, you can see that the training error continues to go down (lower the better) when max_depth increases, whereas the testing error is not as good. This is because the model has carved out specific pink areas (for 'x') as the separation boundary based on the training data. When these boundaries are applied to another set of data, they become poor separation boundaries. So these boundaries cannot be generalised to other testing data sets.