How to implement a generic Queue data structure in Java using linked lists. A queue is a linear data structure that manages data using FIFO pattern.
How to sort collections of user defined class objects in Java using Comparable and Comparator interfaces.
Using binary search algorithm to find the first occurrence, last occurrence and the count of an element in a sorted array with duplicate elements.
Explains how binary search works and a Java program to search an array using binary search algorithm.
Java program to calculate the sum of diagonal elements of a 2-D array. Explains how to find the diagonal elements of an array.
Bubble sort is a simple algorithm to sort elements of an array. In this post, I will explain bubble sort and how to implement it in Java programming language.
Java program to print the first N Fibonacci numbers using the recurssive method. This is a popular question for Java and C programming interviews
Java program to reverse a string using recursion method. This is one of the frequently asked question for Java and C programming interviews
Two different ways of creating threads in Java - Subclass method and Runnable Interface method with examples
Reading and writing files in Java using buffered stream classes BufferedInputStream, BufferedOutputStream, BufferedReader and BufferedWriter.