PocketPills interview question

1) Array problem - find duplicates 2) Stack problem - remove duplicates from string by only eliminating group of 'k' chars