Tag: java coding interview questions
-
How to find subsets of a given string
This is the third solution to list all the subsets or substrings of a given string. This approach uses functional interface with single abstract method implementation using lambda expression, the internal logic utilizes the String’s class substring method for intermediate processing of all sized sub strings.
-
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 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.
