Month: September 2023
Delete Middle Element From Stack in Java
Published on:
In many applications, there might arise a need to modify the content of a stack. One such modification can be...
Read MoreReverse an Array Using Stack in Java
Published on:
Reversing an array is a fundamental problem in computer science. While there are several methods to reverse an array, using...
Read MoreReverse a String Using Stack in Java
Published on:
Reversing a string is one of the classical problems in the field of computer science. One of the most efficient...
Read MoreConvert Singly Linked List Into Circular Linked List in Java
Published on:
A singly linked list is a type of data structure where each node points to the next node in the...
Read MoreDeletion in Linked List in Java
Published on:
Deletion is one of the primary operations in a linked list, allowing us to remove a node based on its...
Read MoreCount the Occurrence of an Integer in a Linked List in Java
Published on:
Counting the occurrence of an integer in a linked list is a fundamental operation that can be useful in various...
Read MorePairwise Swap of a Linked List in Java
Published on:
Pairwise swapping of nodes in a linked list refers to swapping the data of every two adjacent nodes. This process...
Read MoreRemove Every k-th Node of the Linked List in Java
Published on:
Linked lists are versatile data structures that allow for easy insertion and deletion of nodes. Occasionally, we might need to...
Read MoreImplement a Stack Using Singly Linked List in Java
Published on:
A stack is a data structure that supports Last-In-First-Out (LIFO) semantics. The primary operations associated with a stack are push,...
Read MoreDelete without Head Pointer in Java
Published on:
In traditional scenarios of deleting a node from a linked list, we have access to the head node, and we...
Read MoreDeletion From a Circular Linked List in Java
Published on:
A Circular Linked List is a variation of a standard linked list in which the last node points back to...
Read MoreCircular Linked List Traversal in Java
Published on:
A Circular Linked List is a variation of the standard linked list where the last node points back to the...
Read MoreDetect Loop in Linked List in Java
Published on:
A common problem when dealing with linked lists is detecting if the list contains a loop. A loop in a...
Read MoreRemove Duplicate Elements From Sorted Linked List in Java
Published on:
Linked lists are a fundamental data structure in computer science. When dealing with sorted linked lists, it's common to encounter...
Read MoreDelete Middle of Linked List in Java
Published on:
A common task when working with linked lists is to delete the middle node. If the size of the linked...
Read MoreDelete Last Occurrence of an Item From Linked List in Java
Published on:
In linked lists, deleting a node is a fundamental operation. However, a variant of this operation is to delete the...
Read MoreRotate a Linked List in Java
Published on:
Rotating a linked list involves repositioning its nodes such that the list is shifted by a specified number of positions....
Read MoreReverse a Linked List in java
Published on:
A Linked List is a data structure where elements, known as nodes, are connected by pointers. Each node contains a...
Read MoreReverse a Doubly Linked List in java
Published on:
A Doubly Linked List (DLL) is a list in which each node contains a data part and two pointers. The...
Read MoreJava Program to Implement Ford-Fulkerson Algorithm
Published on:
The Ford-Fulkerson Algorithm is a method used to find the maximum flow in a flow network. It works by augmenting...
Read MoreJava Program to Implement Johnson’s Algorithm
Published on:
ohnson’s Algorithm is a method to find the shortest paths between every pair of vertices in a sparse, edge-weighted, directed...
Read MoreJava Program to Implement Dijkstra’s Shortest Path Algorithm
Published on:
Dijkstra’s Algorithm is a graph search algorithm that solves the single-source shortest path problem for a graph with non-negative edge...
Read MoreJava Program to Implement Z-Algorithm for Pattern Matching
Published on:
The Z-Algorithm is a linear time pattern searching algorithm that helps find all occurrences of a pattern in a text....
Read MoreJava Program to Implement KMP Pattern Matching Algorithm
Published on:
The KMP (Knuth-Morris-Pratt) Pattern Matching Algorithm is a linear time complexity algorithm used to find a pattern within a text....
Read MoreJava Program to Implement Strassen’s Matrix Multiplication Algorithm
Published on:
Strassen's Matrix Multiplication is an algorithm for multiplying two matrices. The traditional method to multiply matrices requires O(n^3) operations, but...
Read More