Problem Statement
What is the “diamond problem” in multiple inheritance?
Explanation
The diamond problem arises in languages with multiple inheritance when a class inherits from two classes which both inherit from a common base class. This can lead to ambiguity about which base class’s implementation to use. Many languages avoid this with interfaces or virtual inheritance.