Now you’re just being flippant. In theory interviewers can ask anything, but in practice they don’t. There are a number of kinds of questions they ask because (guess what!), they don’t have the time to spend learning all this random stuff either. They pick a few well-known problem types and go from there because they know how to solve them.
If you get asked a bum question, oh well, that’s life. More often than not, though, you’ll be asked something from a narrow range of topics including search, string manipulation, sorting, tree traversal (related to search), linked lists, and pros and cons of data structures. This list alone probably accounts for 80% of all interview programming problems. This does not take that long to practice.