I have been difficult situation that i accidently delete a SharePoint site collection and create a site collection in a same URL. As i created a site collection in a same URL i thought it can not be restored.
But there is a power shell command which saved my ass.
First you need to run Get-SPDeletedSite command to find out GUID of the deleted site.
Now you can take the SiteId of the deleted site.
Then you need to make sure no site is available in the restore path
Then execute the following command to restore the site collection.
Restore-SPSite –Identity SiteId