Learn Java and Programming through articles, code examples, and tutorials for developers of all levels.
70+ Coding Interview Questions for Software Engineers and Developers in 2025
Top 10 Algorithms books Every Programmer Should Read
How to implement Level Order Traversal of Binary Tree in Java? Example Tutorial
How to Implement Binary Tree InOrder traversal in Java without Recursion - Example Tutorial
How to remove duplicate characters from String in Java? [Solved]
How to find median of two sorted arrays in Java? Example Tutorial
Hello friends, we meet again on our journey of Java and the ocean of knowledge. I am sure you guys must be very excited about today's lesson as today we will deep dive into something that makes everyone's head scratch, yes, we will talk about a popular coding problem. So friends, get ready to scratch your head, learn something, code a few things, and use some of your grey cells (Agatha christie fans rejoicing in the back :p). So friends, today's topic is coding and we will take on one of the most famous and difficult problems. Today we will learn how to find the median of two sorted arrays. seems easy right? Wait a bit, I will make sure you learn something new and make it a bit of a challenge :D
Fibonacci Series in Java Using Recursion
Write a Java program to print the Fibonacci series up to a given number or create a simple Java program to calculate Fibonacci number is common Java questions on fresher interviews and homework. Fibonacci series is also a popular topic on various programming exercises in schools and colleges. Fibonacci series is a series of natural numbers where the next number is equivalent to the sum of the previous two numbers like fn = fn-1 + fn-2. The first two numbers of the Fibonacci series are always 1, 1. In this Java program example for the Fibonacci series, we create a function to calculate Fibonacci numbers and then print those numbers on the Java console.
How to Reverse an Integer in Java without converting to String? Example and Solution
Reverse digits of an integer.
Example 1: x = 123, return 321
Example 2: x = -123, return -321
How to Find Nth Fibonacci Number in Java [Solved] - Example Tutorial
How to implement Linear Search Algorithm in Java? Example tutorial
How to implement Radix Sort in Java - Algorithm Example [Solved]
How to implement Merge Sort Algorithm in Java [Solved] - Example Tutorial
Counting Sort in Java - Example
Top 22 Array Concepts Interview Questions Answers in Java
How to use Deque Data Structure in Java? Example Tutorial
How to find Kth Smallest Element in a Binary Search Tree? [Solved]
How to find the maximum sum level in binary tree in Java? Example Tutorial
How to Find Lowest Common Ancestor of a Binary Tree in Java? Example Tutorial
Hello guys, if you are wondering how to find the lowest common ancestor of a binary tree in Java then you are at the right place. Earlier, I have shared 40+ binary tree questions and today I am going to share solution of one of the popular binary tree question here. To find the lowest common ancestor of a binary tree in java requires that we run through a binary search tree and how it operates. What then is a binary search tree? A Binary tree is a data structure in which each node can have at most two children. That is, each node in the binary tree will have data, left child and right child. The first node of the tree is called the Root.
How to get the first and last item in an array in Java? Example Tutorial
Difference between array and Hashtable or HashMap in Java
A couple of days back someone asked me about the difference between an array and a hashtable, though this is a generic data structure and programming question, I'll answer it from both a general programming perspective as well on Java perspective where Hashtable is not just a data structure but also a class from Java Collection API. Even though both array and hashtable data structure are intended for fast search i.e. constant time search operation also known as O(1) search, the fundamental difference between them is that array require an index while hash table requires a key which could be another object.