I've failed in many technical interviews before. So I would like to add that you should practice coding interview questions on sites like geeksforgeeks/interviewbit.com. Also, try to search for company specific interview questions. For example here is a link to amazon interview questions- https://www.interviewbit.com/amazon-interview-questions/
I've solved around 100 + problems on interviewbit and I've learned so many things and my confidence level is also increased now.
I can say that the best way to prepare for technical interview is to practice,practice,practice coding problems online.