Justice Ruth Bader Ginsburg had two cancerous nodules removed from her left lung at a New York hospital, the Supreme Court announced.