## Generating OTP (One time Password) in PHP

Now these days, OTP (one time password) is mandatory in almost each and every service. A developer can generate OTP in many ways but the… Read More »

Now these days, OTP (one time password) is mandatory in almost each and every service. A developer can generate OTP in many ways but the… Read More »

Shuffling a list Collections.shuffle() is used to shuffle lists in java. Class hierarchy: java ↳ util ↳ Collections Syntax: Collections.shuffle(list); Examples: // Java program to… Read More »

Mid-Square hashing is a hashing technique in which unique keys are generated. In this technique, a seed value is taken and it is squared. Then,… Read More »

Given a password entered by the user, check its strength and suggest some password if it is not strong. Criteria for strong password is as… Read More »

Given three matrices A, B and C, find if C is a product of A and B. Examples: Input : A = 1 1 1… Read More »

Given a function random01Generator() that gives you randomly either 0 or 1, implement a function that utilizes this function and generate numbers between 0 and… Read More »

Given a Binary Tree with children Nodes, Return a random Node with equal Probability of selecting any Node in tree. Consider the given tree with… Read More »

In this article we will discuss how to implement QuickSort using random pivoting. In QuickSort we first partition the array in place such that all… Read More »

Given two sparse matrices (Sparse Matrix and its representations | Set 1 (Using Arrays and Linked Lists)), perform operations such as add, multiply or transpose… Read More »

Introduction A random walk is a mathematical object, known as a stochastic or random process, that describes a path that consists of a succession of… Read More »

Expectation or expected value of any group of numbers in probability is the long-run average value of repetitions of the experiment it represents. For example,… Read More »

Monte Carlo estimation Monte Carlo methods are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. One of… Read More »

In this post, we’ll discuss Binomial Random Variables. Prerequisite : Random Variables A specific type of discrete random variable that counts how often a particular… Read More »

We are given a sorted array A[] of n elements. We need to find if x is present in A or not.In binary search we… Read More »

Given a a of cards, task is to shuffle them. Asked in Amazon Interview Recommended: Please try your approach on {IDE} first, before moving on… Read More »