NYPD officer shot, wounded in Brooklyn while responding to deadly shooting