Diebold Nixdorf interview question

remove duplicated elements from LL