# Tag DSA

## Explaining TreeMap in Java in Simple English

TreeMap in Java, just like the HashMap, is part of the java collection framework. It is a red-black tree-based implementation of the Map interface...

## How to Calculate the Factorial of a given number

In this blog, we will see how to calculate the factorial of a given number even if that number is large..

## How to Merge Two Sorted Arrays

In this blog, we're going to learn how to merge two sorted arrays into a single sorted array using different approaches like insertion sort, merge sort...

## Explaining Selection Sort Algorithm in Simple English

Selection Sort Algorithm is an in-place comparison-based sorting algorithm that sorts the array by repeatedly finding and...

## How to solve nCr%p using Fermat’s Little Theorem?

Given three numbers n, r and p, compute the value of nCr%p. Here p is a prime number greater than n, and nCr is the Binomial Coefficient.

## How to Solve nCr%p using Dynamic Programming

We are given three integers n, r, and p, we have to find the value of nCr%p. Here p is a natural number greater than n and nCr is the Binomial Coefficient.

## HashMap in Java Explained in Simple English with Examples.

HashMap in Java is a part of the Java Collection Framework which stores data in the form of Key and Value pairs where the key is a unique

## How to Sort an Array of 0s, 1s and 2s in Java

Given an array A[] of 0s, 1s, and 2s of size N, the task is to write a function that can sort an array of 0s, 1s and 2s in ascending order

## How to Rotate an Array in Java

In this blog, we will learn what exactly array rotation is? And how to rotate an array either in the left or the right direction.

## How to Calculate the leaders in an Array

Leaders in an array are those elements that are greater than the elements on their right-hand side in the array. To solve them we have to...

## How to Add and Remove an Element from an array at a Specific Index in Java

Arrays can only store a fixed number of elements in it thus making it impossible to either add or remove an element from an array without ...

## Time Complexity of Algorithms Explained with Examples

Time Complexity of algorithms is the amount of time taken by an algorithm to run, as a function of the length of the input..

Automated page speed optimizations for fast site performance