function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sree SalesforceSree Salesforce 

How to remove redundancy in List?

MissedCallMissedCall
Copy it to set.
Rajesh PotnuruRajesh Potnuru
Stop spamming with your interview questions
Ankit AroraAnkit Arora
If it is mandatory to use list then you've to loop it up and check with the duplicate values, else as suggested above you can use sets.