Suppose you are given \(k \) lists. Merge all the lists into onesorted list and print it. Display the unique elements from themerged list. Also, print the frequency of each element. Make sureyour program can take inputs from the terminal.
Sample Input: \([1, 4, 18, 5], [1, 3, 4], [9, 2, 6]\)
Sample Output:
One sorted list: \([1, 2, 3, 4, 5, 6, 9, 18]\)
Unique elements: \([1,2,3,4,5,6,9,18]\)
Frequency:
Suppose you are given \(k \) lists. Merge all the lists into one sorted list and print it. Display the unique elements f
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am