Nokia interview question

2. delete alternative elements in a vector in O(1) space