In this post, we will see about Bellman ford algorithm in java. Bellman Ford Algorithm is used to find shortest Distance of all Vertices from a given source vertex in a Directed Graph. Dijkstra Algorithm …

Freestyle means improvised or unrestricted. A freestyle project in Jenkins is a project that spans multiple operations. It can be a build, a script run, or even a pipeline. According to the official Jenkins wiki, …

Problem Given a Generic Tree, Serialize and Deserialize it. Serialization is a basically a representation of a tree in a String format which takes much lesser space than storing the tree itself. Deserialization is constructing …

In this post, we will see about Lowest Common Ancestor for n-ary Tree. Problem Given a n-ary tree also known as a Generic Tree and also two nodes. You need to find the Lowest common …

In this post, we will see about Segment Tree in java. Table of ContentsProblemSolutionApproach – I:Approach – II:Efficient Approach :Construction :Range Sum Query :Updation: Problem Consider an Array of Integers, int arr = {a1, a2, …

In this post, we will see how to find the local minima in the array. Table of ContentsProblemSolutionNaive approachEfficient approach Problem An element is local minima if it is less than its neighbors. Solution …

In this post, we will see edit distance problem in java Table of ContentsProblemSolutionAlgorithm:How? Problem Given two strings string1 and string2, String1 is to be converted into String2 with the given operations available in the …

In this post, we will see how to call getters and setters using reflection in java. We have already seen how to invoke method using reflection in java. There are two ways to invoke getter …

In this post, we will see how to add elements to the array. Using Apache’s common lang library You can use varargs add method to add elements to array dynamically. Here are the few add …

In this post, we will see about Sliding Window Maximum in java Problem Given an Array of integers and an Integer k, Find the maximum element of from all the contiguous subarrays of size K. …