Skip to content

Category Archives: Java Programs

Given a linked list, the task is to write a program in Java that reverses the linked list without manipulating its pointers, i.e., the reversal… Read More
Feedback edge set is a set of edges where F ⊆ E of a directed graph G, whose every cycle must contain at least one… Read More
Prerequisites: Multidimensional array in C++, Multidimensional array in Java Multidimensional Arrays: Multidimensional arrays are a tabular representation of arrays to store multiple elements. These dimensions… Read More
It is better to have a brief knowledge of the Swing class of java as it is applied in the implementation to do so as… Read More
An Unrolled Linked List is a special type of Linked List in which each node stores an array of elements, unlike a simple linked list.… Read More
HashMap<K, V> is a part of Java’s collection since Java 1.2. This class is found in java.util package. It provides the basic implementation of the… Read More
The HashSet class implements the Set interface, backed by a hash table which is actually a HashMap instance. No guarantee is made as to the… Read More
In this article, we are going to see how to iterate through a List. In Java, a List is an interface of the Collection framework.… Read More
Given two integers N and K. Create an array of N positive integers such that the sum of all elements of the array is divisible… Read More
LinkedBlockingQueue API is an optionally-bounded queue based on linked nodes. It orders the elements in FIFO(First In First Out) order. The head of this queue… Read More
The WeakHashMap class is part of the Java Collections Framework, implementing the Map interface and extending the AbstractMap class. The Map interface helps us map… Read More
Problem Statement: This is a Java program for placements and interview criteria such as how many students will appear for online tests, academic results, and… Read More
A Rectangle is a quadrilateral with four right angles (90°). In a rectangle, the opposite sides are equal. A rectangle with all four sides equal… Read More
The pair class in C++ Standard Library is used a lot.  We can implement our own user-defined pair class in Java and its object can… Read More
A feedback vertex set of a graph is a set of vertices whose removal leaves a graph without cycles. The following graph becomes a Directed… Read More