#### Write a utility function to create linked list from a sequence of items – using iteration and recursion

While working on linked data-structures, we have to create linked lists regularly. To ease that process, we can create a utility function, which creates linked list from given data and…

#### Create a Node class using java generic – for linked list

This class can not be used in any practical scenario. Because, the data part is going to be a lot different. While learning the datastructures and algorithms, this class is…

#### Find length of a linked list using recursion

You can read about calculating length of a linked list by iterative method here. In recursion, the iterative loop or explicit loop is replaced by recursive function calls. In recursive…

#### Find length of a linked list by iterative method

We are going to find lenght of a Linked List using iterative method. You can read the recursive method here. The simple logic to find length of a Linked list…

#### Creating a boolean switch using BooleanSupplier, which alternatively returns true and false.

In this article, we will create a BooleanSupplier implementation, which returns true or false value on the alternate basis. If it returns true on current call, then it will return…

#### Providing implementation for getAsBoolean in BooleanSupplier – a functional interface – in java

If you don’t know about Functional Inteface then you can read about it, in the provided link. Now coming to BooleanSupplier, it is a functional interface. It has only one…

#### How to use default methods and and or, to compose new BiPredicate implementations from other BiPredicates in java

In BiPredicate Part 1 , we learnt about using test and negate functions. In this article we will use default methods and and or methods to compose BiPredicates, which can…

#### How to use or implement test and negate methods in java.util.function.BiPredicate in java

We have Functional Interfaces in java, which returns a boolean-value after operating on it’s inputs. BiPredicate is one of those Functional interfaces, which returns a boolean value. It has four…

#### Using java.util.function.BinaryOperator to create function to return maximum and minimum value in functional programming way

You can read first part of this article here . We all have implemented methods to get maximum or minimum between two different values. A value can be anything, it…

#### How to use and implement apply and andThen functions provided by java.util.function.BinaryOperator in java

java.util.function.BinaryOperator is a Functional Interface, it has only one abstract method. It extends another Functional Interface java.util.function.BiFunction. It inherits apply and andThen methods from BiFunction, and adds two static factory…