Code for problem "Remove Element".