Interviewers rarely expect you to invent new algorithms.
They almost always test your understanding & skills to apply the algorithms you've studied.
So, whatever algorithms (array, DP, search/sort, DFS/BFS, greedy, etc) you learned at school are usually used to solve questions.