Marlabs Interview Question

Consider a program to remove duplicate characters