Gmail allows you to restore a backup of all your contacts, which can date up to 30 days back. Once you have done this, you can re-sync your device with your Google account and get all your contacts back.
If you haven't used Gmail, you need to root your device and get access to check out the database files of Samsung phone, then you can preview all contacts, including deleted ones. Select and restore deleted contacts from Android device to your computer. FORecovery Android Data Recovery is magic program to help you.