Tag: test
-
How to write JUnit test code in Java for the for Anagram check function ?
This is the JUnit 5 solution to cover all kinds of inputs provided to Anagram function. This Unit test executes tests for the class ‘AnagramJ8’.
-
How to find the triplet numbers from an array whose sum is divisible by 9 using stream
This is the third solution to find the triplets of numbers in which their sum is divisible by 9 from an array of integers. This method uses three nested IntStream to traverse array, add any three numbers come across in each iteration, and then uses simple predicate to verify that the sum is divisible by…
-
How to find the pairs of numbers from an array whose sum is divisible by 9 using stream
This is the third solution to find the pairs of numbers in which their sum is divisible by 9 from an array of integers. This method uses nested IntStreams to traverse the array , add any two numbers come across in each iteration, and then uses a simple predicate to verify that the sum is…
