Tag: collections
-
How to move all Zero numbers to end in an array of integers
This is the first solution to move all Zero numbers to the end of an array of integers. This solution modifies the same array with all non-zero numbers moving left, and Zero numbers moved to the end.
-
How to count whether any number in an array repeated twice or thrice
This is the second solution to count whether any of the number in an array repeated twice or thrice from the same array of integers using Collections class.
-
How to find the duplicate words in a sentence using Collections class
Find the duplicate words in a given sentence of strings using the frequency method of the Collections class. This is the third possible solution to solve this problem.
-
How to find the minimum and maximum length strings in a sentence of strings using HashMap
This is the second solution to find the maximum length and minimum length strings from a given input sentence of strings, using the HashMap methods.
-
How to find first and second biggest numbers in an ArrayList of integers
This is the fourth solution to find the first and second biggest numbers from the given ArrayList of integers, using Collections class.
