Blog Archives

♥♦ HashMap & HashSet and how do they internally work? What is a hashing function?

HashMap is not only one of the frequently used data structures, but also one of the popular interview topics. Q1. How does a HashMap store data? A1. As key/value pairs. You can store and retrieve values with the keys. Q2. What is the HashMap lookup time in Big O notation?

Read more ›

Posted in Collection and Data structures, Objects
Tags: ,

Sorting a Map by values instead of keys

This post is motivated by ““Sorting a list or array of numbers by frequency of occurrences in Java” Sorting a Map by Keys Sorting a map by its keys is straightforward

Sorting a Map by its Values – Pre Java 8

If you want to sort by age

Read more ›

Posted in Collection and Data structures

♥ Java Iterable Vs Iterator differences and know how

Q1. What are the differences between Iterator<T> Vs Iterable<T>? A1. The “Iterable” was introduced to be able to use in the “foreach” loop. A class implementing the Iterable interface can be iterated over. For example,

Hence, it can be used in the foreach loop

The Iterable interface has

Read more ›

Posted in Collection and Data structures, Differences Between X & Y
Tags:

02: ♦ Java 8 Streams, lambdas, intermediate vs terminal ops, and lazy loading with simple examples

A stream is an infinite sequence of consumable elements (i.e a data structure) for the consumption of an operation or iteration. Any Collection<T> can be exposed as a stream. It looks complex, but once you get it, it is very simple. The operations you perform on a stream can either

Read more ›

Posted in Collection and Data structures, FP, Java 8, Java 8 Tutorial
Tags: ,

Part-3: Java Tree structure interview and coding questions

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 returns either a Triple tree or Leaf data.

Step 2: The Leaf that implements the Tree interface.

Step…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Coding, Collection and Data structures, member-paid, Tree structure

♦ Find the first non repeated character in a given string input

Pseudocode 1) Precodnition check for null or empty input. 2) Loop throught the input string, and store each “character” as a key in a map with the value being the “character count”. For example, an input string of “stress” would have Key -> Value s -> 3 t -> 1…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Can you write code?, Coding, Collection and Data structures, member-paid

04: Understanding Big O notations through Java examples

Q. Have you seen job advertisements requiring Java candidates to work in real-time or high volume transaction processing systems? If you are applying for such jobs, you can be quizzed on Big O notation. Here are some basics to brush up on. Big-O gives you the upper bound. For example, if you need to…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Big O notation, Collection and Data structures, Low Latency, member-paid

Java 8: Different ways to sort a collection of objects in pre and post Java 8

The object we are going to sort is a Person.

Option 1: Writing your own Comparator implementation. This can be done as an anonymous inner class instead of a separate class.

The test class

Option 2: The Option 1 is not bad, but the the moment you…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Collection and Data structures, Java 8, member-paid
Page 1 of 212

600+ Java/JEE Interview Q&As

open all | close all

200+ FAQs for Quick Java Interview Prep

open all | close all

16 Technical Key Areas to standout

open all | close all

80+ step by step Tutorials conducive to self-taught projects

open all | close all

100+ pre-interview coding tests

open all | close all

How good are your …..?

open all | close all