I got stuck with a disk which was encrypted with Time Machine and was not able to format it. A lot of googling did not help. Finally i was able to do it by connecting the disk to a Windows Machine.
Go to Disk Management Delete All Existing Partition, Make sure you are selecting other than Disk0.
You will not be able to delete the EFI Partition. To delete EFI Partition
[step 1] With the USB drive connected, open a command prompt with elevated privileges.
[step 2] Start the disk partition utility by typing diskpart.
[step 3] Type list disk to see all of your connected disks (be sure you’re working on the right disk, if you select the wrong disk you’ll be sorry – see disclaimer). To select a disk type select disk # where # is the disk number you want to delete the EFI partition from.
[step 4] Type select partition # where # is the number of the partition you want to delete.
[step 5] Type delete partition override