Question d’entretien chez IBM

given linked list, remove the odd indices elements/node