A young police officer who was shot in the head during the Bondi Beach attack has been released from hospital.