Nokia interview question

Leetcode Easy questions : remove duplicate element. Different approach, complexity