Blog Archives
1 2

Java 8 String streams and finding the first non repeated character with functional programming

Q1.Find the first non repeated character in a given string input using Java 8 or later?
A1.Extends Find the first non repeated character in a given string input with Java 8 functional programming.

For example, an input string of “stress”

…

Read more ›



Java coding practice problems – prime and powerful

There is no other way to pass the Java coding tests other than practicing. I have failed Java coding tests due to lack of practice. How often do you get work with tree and graph data structures? Ho often do you work with algorithms?

50+ Java coding practice problems Links:

Can you write code in Java?

…

Read more ›



Java coding question on recursion and generics

Q. Can you write Java code to compute a collection of numbers supplied to it? The computation could be addition, subtraction, etc. Use recursion to compute the numbers. Here are some requirements to take into considerations. 1. It should be flexible enough to convert from Recursion to iteration if required....

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Palindrome

Q1. Can you write a function to determine if a given string input is a palindrome? A palindrome is a word or sentence that reads the same forward as it does backward. For example, the terms “racecar”, “dad”, “madam” and the name “Hannah”. The longest palindromic substring of “bananas” …...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Reverse a given String

Q1. Can you write a method that reverses a given String? A1. Can be done a number of different ways. Best Practice: Using the Proven Java API

It is always a best practice to reuse the API methods as shown above with the StringBuilder(input).reverse( ) method as it is...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Reverse Polish Notation (RPN)

Q1. Can you explain Reverse Polish Notation (RPN)? A1. You have already heard about the following from your elementary schooling: “Please Excuse My Dear Aunt Sally” … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Sorting a list of numbers by frequencies in Java using a BST tree

This extends Sorting a list of numbers by frequencies in Java using a map to use a BST instead of a Map.

PROBLEM to solve: Sort a list of numbers by frequency of their occurrences. For example

INPUT: [ 5,

…

Read more ›



Sorting a list of numbers by frequencies in Java using a map

PROBLEM to solve: Sort a a list of numbers by frequency of their occurrences. For example INPUT: [ 5, 3, 7, 7, 7, 5, 4, 8 ] OUTPUT: [7, 7, 7, 5, 5, 3, 4, 8] ALGORITHM to use 1. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Splitting input text & string processing coding Q&A

Q1. Can you write code to extract numbers from a given input text and return the sum of those numbers? Example: “1 some text 2 more text 4 more text 8” should return 15 as the sum. A The key steps are: 1. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


1 2

300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data