Category: Java
-
How to check two sentences or strings are Anagram
This is the fourth solution to check whether the given two strings are Anagram are not. This program uses lambda expression with two parameters. The internal logic uses the String’s class methods toCharArray, contentEquals and Array’s sort method
-
How to count whether any number in an array repeated twice or thrice
This is the third solution to count whether any of the number in an array repeated twice or thrice from the same array of integers using functional interface and lambda expression.
-
How to find length of alpha numeric value or string
This is the second solution to find the length of an alpha numeric or string value, using functional interface and lambda expression without return statement. This approach uses direct String class length method.
-
How to find array triplets with sum of two elements equals other element in the same array
This is the second solution to find array triplets, with sum of any two numbers equals with any other element in the same array. This approach uses functional interface and lambda expression.
-
How to find length of long integer value using String class
This is the second solution to find the length of a given long integer value with help of functional interface and lambda expression. The internal logic is same that is converting long to string, and apply length method.
-
How to find sum of digits in an alpha numeric value
This is the second solution to find the sum of digits from a given alpha numeric value by using a functional interface with single abstract method and lambda expression. Internally it uses String and Character class methods.
-
How to check whether a string is a palindrome
This is the second solution to check whether a given string is palindrome or not. This approach uses a simple predicate with lambda expression, and uses String class methods.
-
How to check whether a string is a palindrome
This is the first solution to check whether a given string is palindrome or not. This approach uses a simple predicate with lambda expression, and uses StringBuffer class method.
-
How to extract characters and numbers from an Alphanumeric value
This is the third solution to extract characters and numbers from an alpha numeric value into separate strings. This program uses the simple predicate and predicates chaining to check for characters and numbers.
-
How to find the triplet numbers from an array whose sum is divisible by 9
This is the second solution to find the triplets of numbers in which their sum is divisible by 9 from an array of integers. This method uses the core logic of traversing array using 3 nested for loops, add any three numbers come across in each iteration, and then uses simple predicate to verify that…
