Remove Duplicate Players from Auction
Remove Duplicate Players from Auction
EasyStrings50% accepted
Priya manages the IPL auction database in Mumbai and discovers duplicate player entries from a data sync error. She needs to clean the roster by removing duplicates while preserving the order of first appearance.
Approach
Given a comma-separated list of player names with duplicates, remove duplicates while maintaining the order of first occurrence.
Input
Virat,Rohit,Virat,Bumrah,Rohit
Output
Virat,Rohit,Bumrah
More Strings problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards