I deleted the contacts from my phone last week, then I searched many ways from many forums, and finally I downloaded a data recovery tool, because I did not back up the contacts before. Guys, if you have the same problem, you can follow this, how to get deleted contacts back.
I suggest you firstly check out the backup, whether you have synced the data to Gmail account, or saved on your pc.
Then, you should never add more data to your phone after data loss, cuz they can take up more space, the lost data will be overwritten.
You can try FORecovery Android Data Recovery, which will help to restore deleted contacts from Android and SIM card.