I would say the biggest thing you can do is practice on Leetcode. You need to be see the different patterns that are used to solve certain classes of problems (tree problems, dynamic programming, array focused problems). There are common data structures that pop up in almost all of the questions (hashmap, linked lists, tree, bst, etc). It's just a matter of exposure but focus on the underlying pattern/technique used to solve the problem and understand how and why it's being used as opposed to rote memorization.
The alternative is finding companies that do not ask these types of interview questions. The only big company I know that doesn't ask those types of questions is Stripe but I'm sure there are plenty of others though they may not be 100% what you are looking for.
The alternative is finding companies that do not ask these types of interview questions. The only big company I know that doesn't ask those types of questions is Stripe but I'm sure there are plenty of others though they may not be 100% what you are looking for.