Tag: Arrays.asList
-
How to find array triplets with sum of two elements equals other element in the same array using stream
This is the third solution to find array triplets, with sum of any two numbers equals with any other element in the same array. This approach uses IntStream, flatMap, filter, mapToObj of Stream.
-
How to find the leader numbers in an array in the forward direction
This is the second solution to find the leader numbers in an array in the forward direction. An element is leader if it is greater than all the elements to its right side. And the rightmost element is always a leader
-
How to find the leader numbers in an array from the reverse direction
This is the first solution to find the leader numbers in an array from the backward direction. An element is leader if it is greater than all the elements to its right side. And the rightmost element is always a leader
-
How to find the minimum and maximum length strings in a sentence of strings using stream
This is the third solution to find the maximum and minimum length strings from a given input sentence of strings, using the reduce() methods of stream.
