Koddi Interview Question

1. Remove duplicates from array 2. Remove second smallest element in array