Capital One Interview Question

Write a java program to remove the duplicates from the sorted list