Skip to content

Category Archives: Randomized

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… Read More
Given two integers N and M, the task is to generate any N * M sized maze containing only 0 (representing a wall) and 1… Read More
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… Read More
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… Read More
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… Read More
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… Read More
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… Read More
Given two integers N and K representing number of trials and number of total threads in parallel processing. The task is to find the estimated… Read More
There are many ways of classifying algorithms and a few of them are shown below: Implementation Method Design Method Other Classifications Classification by Implementation Method:… Read More
Generating Random Unweighted Binary Tree: Since this is a tree, the test data generation plan is such that no cycle gets formed. The number of… Read More
Given a positive integer N, the task is to generate a random binary string of length N. Examples: Input: N = 7Output: 1000001 Input: N… Read More
Given an integer N. A number guessing game is a simple guessing game where a user is supposed to guess a number between 0 and… Read More
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… Read More
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.… Read More
If we keenly observe, randomness can be effectively derived from nature. Despite being explainable by scientific phenomena, the behavior of most matter on earth is… Read More