A short while ago I met with the director to discuss my contributions to a product launch. He was there to acknowledge my contributions and I was a little nervous since I've also recently applied for a promotion. We had a friendly conversation and at one point he was discussing an algorithm he worked on for solving the traveling salesman problem (simulated annealing). I have some experience with this. I let the director speak about it for a while and saw an opening in the conversation to mention my own experience with this and elaborated with more details of the algorithm.
My concern is that I don't want to come off as trying to one up someone. I wanted to inspire confidence and demonstrate knowledge of various domains. The conversation was mostly about my director because I often get carried away with questions about other people and I was a bit worried that I didn't share enough about myself. In the moment I was also aware that the director was enjoying himself explaining the subject matter so I'm not sure if it was important for me to remark that I was familiar with the content.
Is it inappropriate to interrupt an explanation the way I did? What is an effective way to demonstrate competency while a superior is explaining something that I'm familiar with?
Note: This is similar to (How to deal with a person who constantly explains things you already know well?) but different because the relationship is different and my objective was to demonstrate competency to my superior.