Tutorials
Courses
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
Web Technologies
32.1K+ articles
Misc
7.8K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Strings
2.1K+ articles
Greedy
1.4K+ articles
Sorting
1.1K+ articles
Dynamic Programming
1.1K+ articles
Searching
1.0K+ articles
Tree
909+ articles
DSA
/
Algorithms
/
Randomized
Randomized
40 posts
Recent Articles
Popular Articles
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
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
Misc
Sorting
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
DSA
Probability
Mid-Square hashing
Last Updated: 11 July 2025
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
std::uniform_int_distribution class in C++
Last Updated: 11 July 2025
In Probability, Discrete Uniform Distribution Function refers to the distribution with constant probability for discrete values over a range and zero probability outside t...
read more
Mathematical
Randomized
C++ Programs
DSA
cpp-class
cpp-random
Maximum String Partition
Last Updated: 22 December 2022
Given a string. The task is to find the maximum number P, such that a given string can be partitioned into P contiguous substrings such that any two adjacent substrings mu...
read more
Strings
Analysis of Algorithms
Greedy
Randomized
DSA
substring
Find N random points within a Circle
Last Updated: 22 June 2022
Given four integers N, R, X, and Y such that it represents a circle of radius R with [X, Y] as coordinates of the center. The task is to find N random points inside or on ...
read more
Geometric
Randomized
DSA
school-programming
circle
Find the player who wins the game by removing the last of given N cards
Last Updated: 04 May 2021
Given two integers N and K, where N represents the total number of cards present when game begins and K denotes the maximum number of cards that can be removed in a single...
read more
Greedy
Mathematical
Randomized
Game Theory
DSA
Random Acyclic Maze Generator with given Entry and Exit point
Last Updated: 05 April 2023
Given two integers N and M, the task is to generate any N * M sized maze containing only 0 (representing a wall) and 1 (representing an empty space where one can move) wit...
read more
Graph
Randomized
DSA
Disjoint Set Union (Randomized Algorithm)
Last Updated: 01 August 2024
A Disjoint set union is an algorithm that is used to manage a collection of disjoint sets. A disjoint set is a set in which the elements are not in any other set. Also, kn...
read more
Randomized
Technical Scripter
Picked
Technical Scripter 2022
DSA
disjoint-set
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
C++ Program For Selecting A Random Node From A Singly Linked List
Last Updated: 17 August 2023
Given a singly linked list, select a random node from the linked list (the probability of picking a node should be 1/N if there are N nodes in the list). You are given a r...
read more
Linked List
Randomized
C++ Programs
DSA
C Program For Selecting A Random Node From A Singly Linked List
Last Updated: 21 July 2022
Given a singly linked list, select a random node from the linked list (the probability of picking a node should be 1/N if there are N nodes in the list). You are given a r...
read more
Linked List
Randomized
C Programs
DSA
Java Program For Selecting A Random Node From A Singly Linked List
Last Updated: 21 July 2022
Given a singly linked list, select a random node from the linked list (the probability of picking a node should be 1/N if there are N nodes in the list). You are given a r...
read more
Linked List
Randomized
Java Programs
DSA
Python Program For Selecting A Random Node From A Singly Linked List
Last Updated: 21 July 2022
Given a singly linked list, select a random node from the linked list (the probability of picking a node should be 1/N if there are N nodes in the list). You are given a r...
read more
Linked List
Randomized
Python Programs
DSA
1
2
3
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 !