Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
Strings
3.2K+ articles
Competitive Programming
2.3K+ articles
Greedy
2.1K+ articles
Algorithms
2.0K+ articles
Sorting
1.8K+ articles
Searching
1.7K+ articles
Dynamic Programming
1.6K+ articles
Tree
1.4K+ articles
DSA
/
Algorithms
/
Randomized
Randomized
68 posts
Recent Articles
Popular Articles
Shuffle or Randomize a list in Java
Last Updated: 09 September 2021
Shuffling a listCollections.shuffle() is used to shuffle lists in java.Class hierarchy:java ↳ util ↳ CollectionsSyntax:Collections.shuffle(list);Examples:[tabby tit...
read more
Java
Randomized
Java Programs
Java-List-Programs
DSA
Image encryption using cellular automata
Last Updated: 24 October 2019
To propose an image encryption system using one dimensional cellular automata for image encryption and decryption. Cellular automata can be corresponded with the essential...
read more
Algorithms
Analysis of Algorithms
Pattern Searching
Mathematical
Randomized
Recursion
Theory of Computation
DSA
Mid-Square hashing
Last Updated: 20 March 2024
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, some digits from the middle...
read more
Randomized
DSA
Freivald’s Algorithm to check if a matrix is product of two
Last Updated: 14 February 2023
Given three matrices A, B and C, find if C is a product of A and B.Examples:Input : A = 1 1 1 1 B = 1 1 1 1 C = 2 2 2 2Out...
read more
Algorithms
Randomized
Matrix
DSA
Implement random-0-6-Generator using the given random-0-1-Generator
Last Updated: 21 June 2023
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 6(both incl...
read more
Algorithms
Mathematical
Randomized
DSA
Select a Random Node from a tree with equal probability
Last Updated: 18 November 2022
Given a Binary Tree with children Nodes, Return a random Node with an equal Probability of selecting any Node in tree.Consider the given tree with root as 1. 10 / ...
read more
Misc
Tree
Randomized
Probability
DSA
QuickSort using Random Pivoting
Last Updated: 14 September 2023
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 elements to the left of...
read more
Sorting
Randomized
DSA
Random Walk (Implementation in Python)
Last Updated: 12 May 2025
A random walk is a mathematical concept used to describe a path made up of a series of random steps. It's also called a stochastic process and can be visualized in spaces ...
read more
Randomized
Python
DSA
Expectation or expected value of an array
Last Updated: 06 August 2024
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, the expecte...
read more
Mathematical
Randomized
DSA
Estimating the value of Pi using Monte Carlo
Last Updated: 28 July 2022
Monte Carlo estimationMonte Carlo methods are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. One of the basic...
read more
Algorithms
Mathematical
Randomized
Project
DSA
Simulated Annealing
Last Updated: 08 April 2024
Problem : Given a cost function f: R^n -- R, find an n-tuple that minimizes the value of f. Note that minimizing the value of a function is algorithmically equivalent to m...
read more
Java
Algorithms
Mathematical
Randomized
DSA
Binomial Random Variables
Last Updated: 10 April 2025
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 event ...
read more
Mathematical
Randomized
DSA
Randomized Binary Search Algorithm
Last Updated: 25 January 2022
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 always used middle element, here we will randomly pick one e...
read more
Algorithms
Divide and Conquer
Searching
Randomized
DSA
Shuffle a deck of cards
Last Updated: 21 June 2023
Given a deck of cards, the task is to shuffle them. Asked in Amazon InterviewPrerequisite : Shuffle a given arrayAlgorithm:1. First, fill the array with the values in orde...
read more
Randomized
DSA
Find an index of maximum occurring element with equal probability
Last Updated: 16 March 2023
Given an array of integers, find the most occurring element of the array and return any one of its indexes randomly with equal probability.Examples:Input: arr[] = [-1, 4, ...
read more
Randomized
DSA
1
2
3
4
5
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !