Remove Duplicates & Sort List Descending π’
Learn how to remove duplicate integers from a list and sort it in descending order with a simple Python method.

SJ Programming Solutions
396 views β’ Dec 10, 2022

About this video
#short #youtubeshorts Remove duplicate elements from list of integer and sort the list in desc order
Remove the duplicate elements from the list of integer &
sort the list in descending order
input 1,33,4,5,1,90,56,4,4,5
output 90,56,33,5,4,1
List list=Arrays.asList(1,33,4,5,1,90,56,4,4,5);
list.stream().
distinct().
sorted(Comparator.
reverseOrder()).
collect(Collectors.toList()).
forEach(System.out::println);
Remove the duplicate elements from the list of integer &
sort the list in descending order
input 1,33,4,5,1,90,56,4,4,5
output 90,56,33,5,4,1
List list=Arrays.asList(1,33,4,5,1,90,56,4,4,5);
list.stream().
distinct().
sorted(Comparator.
reverseOrder()).
collect(Collectors.toList()).
forEach(System.out::println);
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
396
Likes
26
Duration
0:59
Published
Dec 10, 2022