Interview questions are great tests of algorithmic thinking, which is why some companies ask them. I don't plan on interviewing for a job any time soon and I probably wouldn't want to work at a company that asks questions like this anyway. But I would like to get better at problem solving in general, and interview questions seem like a great way to focus on developing a better analytical approach.
I wonder if anyone else studies these types of problems and gains something from it, or if they're just asked during interviews and then forgotten.
sounds a little like cognitive dissonance there, not wanting to work for a company that gave you a perfectly reasonable test of your algorithmic abilities.
it's not whether you immediately forget the question/solution, it's about reasoning your way to the solution. It doesn't matter if you forget after because you've proven that you can get there.
I wonder if anyone else studies these types of problems and gains something from it, or if they're just asked during interviews and then forgotten.