Yes, you can restore a deleted contact within a certain amount of time.
Click View above your contact list and select Deleted Contacts.
Contacts that you've deleted display in the list.
Check the box next to each contact that you want to restore.
The right side of the page lists several options.
Click the Restore option.
You can also restore a contact while viewing the contact's details. Just click Restore in the upper-right corner.
(Note: Deleted contacts are only kept by Yahoo for about one month until they are deleted permanently. Restoring a contact that used to be a connection does not restore the old connection.)