You are also interviewing the interviewers and the team. It is up to you to decide if you actually want to work for this team.
Rejection maybe hard. Getting the question right is not always sufficient. You are being examined from your personality to your skills. Your skills must match with what the hiring team needs. There is no shame in being rejected for a role.
You should try to visualize what exactly the interviewers want from the interview. Think about the questions they may ask, and make sure you have some questions of your own to ask them.