This extends Writing a simple SQL where clause parser in Java – Part 1. In the next post, let’s look at the parsing to an Abstract Syntax Tree (i.e. AST …
This extends Writing a simple SQL where clause parser in Java – Part 1. In the next post, let’s look at the parsing to an Abstract Syntax Tree (i.e. AST …
#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. What is a class invariant? A1. Class invariant is — what must be true about each instance of a class? If an invariant fails then there could be a …
1. Why do you want to convert arrays to lists? 1. Arrays don’t play well with generics. 2. Arrays are of fixed size, and if you want to add or …
#1. Why convert a Date to String & a String back to Date
(a) Convert a String input from say a file date, so that you can perform operations like …
This is the reverse of Converting an Array/List to BST in Java. It is a very common task to convert a collection type A to B as a developer. More …
Q. What is a BST? A. BST stands for Binary Search Tree, sometimes called ordered or sorted binary trees. This is a type of data structures that store “items” such …
#1. Does Java have a “Money” class? No. This will change in Java 9 with the “Money API”. JSR 354 defines a new Java API for working with Money and …
Q1. Can you write a function to determine the nth Fibonacci number? The Fibonacci numbers under 2000 are : 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, …
Complimenting Fibonacci number coding – iterative and recursive approach, we can improve performance by caching. If you run this
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: …
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.