This is an extension to Java Tree structure interview and coding questions — Part 2, and adds functional programming and recursion. Step 1: The Tree interface with get( ) method that …
This is an extension to Java Tree structure interview and coding questions — Part 2, and adds functional programming and recursion. Step 1: The Tree interface with get( ) method that …
This is an extension to Java Tree structure interview questions and coding questions — Part 3 where recursion was used for FlattenTree interface. Let’s use iteration here. Step 1: The FlattenTree interface.
#1: Choose the right type of Java data structure based on usage patterns
like fixed size or required to grow, duplicates allowed or not, ordering is required to be maintained …
More Data Structure and Algorithms Coding Questions and answers in Java.
Q1. Write a program that allows you to create an integer array of 5 elements with the following …
The Big O notation and Java data structures go hand-in-hand in coding tests & job interviews Q1. What do you know about the big-O notation and can you give some …
Q1. Given an array of integers, find two numbers such that they add up to a specific target number? For example, Given numbers: {2, 3, 8, 7, 5} Target number: …
The SinglyLinkedList was created in the post “LinkedList creating from scratch in Java”. This extends “SinglyLinkedList” post. Q. How to find the middle node of a linked list in a …
Q. Write a method which takes the parameters (int[ ] inputNumbers, int sum) and checks input to find the pair of integer values which totals to the sum. If found …
Q. Java does not have a Graph implementation, how would you go about implementing your own? A. Graphs are data structures that represent arbitrary relationships between members of any data …
Q. Java does not have a Graph implementation, how would you go about implementing your own? A. Graphs are data structures that represent arbitrary relationships between members of any data …
Q. If Java did not have a HashMap implementation, how would you go about writing your own one? A. Writing a HashMap is not a trivial task. It is also …
Q. Can you write a code to search for number 5 in 7 3 6 8 2 9 5 4? A. The code below uses the linear search algorithm. The …
Q. How to create a LinkedList from scratch A. Adding Removing Step 1: The node that stores the data and the reference to the next Node.
I have a good news, I got job offer. I like to share with you from my bottom of my heart feeling thankful to you.