These are some sample set of questions which you can ask candidates in an interview. I have also provided a working solution for each question. Please note that there might be some edge cases (especially input validations) which I have purposely not included so as to not enlongate the solution.
The main focus of this is the business logic of the solution. Feel free to contribute more to this.