 # Algorithm

## Algorithm and Flowchart: Differences Explained

What is an Algorithm? Algorithms and flowcharts are used for the representation of a program in a different manner, especially in computer programming. An algorithm is a step-by-step procedure, which has to be followed when an input is given to obtain the desired output or result. It is generally represented

## SHA-1 Hash Algorithm

Introduction SHA-1 or Secure Hash Algorithm is a cryptographic hash function that takes a string as an input and generates a hash value of 160bit or 20 bytes. The hash value is generally called a message digest. This message digest is generally altered into a 40-decimal long hexadecimal value. Many

## Big O Notation: Space and Time Complexity

Introduction Analysis of the runtime of the algorithm is performed in three ways they are Big O notation, Theta notation, and Omega notation. This article mainly explains Big O notation. It is the worst-case time complexity of the algorithm. It is calculated when huge inputs are given to the computer

## Rabin Karp Algorithm: C++ Implementation

Introduction * While it's easy to spot patterns in a string with the naked eye, what if you wanted to use a computer program to detect those same patterns? Well, a Rabin-Karp algorithm can help with that. * Using a hash function, the Rabin-Karp algorithm is used to identify patterns in a

## Sliding Window Problem – C++ Implementation

Introduction The sliding window is a highly innovative method for resolving certain challenging issues using an array or string. It is frequently used to change the problem's O (n2) time complexity to O (n). Maintaining a window that complies with the problem limitations is the core principle. Two pointers, such

## Longest Increasing Subsequence Problem

Introduction Finding a subsequence of a given sequence with elements sorted from lowest to highest and with the greatest possible length is known as the Longest Increasing Subsequence problem. This sequence need not be continuous or exclusive. For instance, [0, 2, 6, 9, 11, 15] is the longest growing subsequence

## What Is An Algorithm (Understanding The Ingredients)

Introduction An algorithm is just a step-by-step process that specifies a series of directives that must be followed in a particular sequence in order to yield the desired outcome. An algorithm may be implemented in more than one programming language because algorithms are typically developed independently of the underlying languages.

## RSA Algorithm: Concepts and Implementation

Introduction In this article we will do a deep-dive into RSA, which is a strong cryptography oriented algorithm. We will understand its origins, uses, and implementation in detail with examples along the way. Code provided will be in C++. Modern technology  makes use of the RSA Algorithm to encrypt and

## How to do State Space Reduction?

Overview Dynamic programming is a powerful technique for solving optimization problems that can be broken down into smaller subproblems. It involves storing the solutions to these subproblems so that they can be reused, rather than recalculated each time they are needed. This can greatly reduce the time complexity of the

## A Quick Guide to Backtracking Algorithm

Introduction A backtracking algorithm solves some computational problems, especially constraint satisfaction problems. In the algorithm, candidates progress incrementally toward the solution, and when a backtrack is no longer possible, the algorithm abandons the candidate. Introduction to Backtracking Algorithm A backtracking algorithm uses brute force to discover all possible solutions for