Sunidhi Bansal has Published 1078 Articles

Probability of getting at least K heads in N tosses of Coins in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 10:52:10

589 Views

Probability is the chances of getting the desired output from the set of data available. The range of probability lie between 0 and 1 where an integer 0 shows the chances of impossibility and 1 indicates certainty.What is probability?Probability in mathematics gives us the tools that tell the uncertainty of ... Read More

Priority Queue in C++ Standard Template Library (STL)

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 09:29:44

509 Views

Priority queue is an abstract data type for storing a collection of prioritized elements that supports insertion and deletion of an element based upon their priorities, that is, the element with first priority can be removed at any time. The priority queue doesn’t stores elements in linear fashion with respect ... Read More

Product of all Subsequences of size K except the minimum and maximum Elements in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 07:45:59

228 Views

Given an array arr[n], containing n number of integers and an integer k for defining the size; the task is to print the product of all the subsequences of size k except the minimum and maximum elements.Let us assume we have a set of 4 elements {1, 2, 3, 4} ... Read More

C Program for Round Robin scheduling

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 07:41:30

9K+ Views

We are given with the n processes with their corresponding burst time and time quantum and the task is to find the average waiting time and average turnaround time and display the result.What is Round Robin Scheduling?Round robin is a CPU scheduling algorithm that is designed especially for time sharing ... Read More

Product of lengths of all cycles in an undirected graph in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 07:30:16

243 Views

We are given with the undirected as well as unweighted graph as an input and the task is to find the product of the cycles that are formed in the given and display the result.ExampleInputIn the given figure, there are 8 nodes and out of that 5 nodes are forming ... Read More

Priority Queue Introduction in C/C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 07:25:27

566 Views

A priority queue is a type of queue in which elements are inserted or deleted according to the priorities assigned to them where priority is an integer value that can range between 0-10 where 0 shows the element with the highest priority and 10 shows the element with the lowest ... Read More

Probability of getting a sum on throwing 2 Dices N times in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 07:24:49

370 Views

We are given with the sum and the number of times the pair of dice is thrown as an input and the task is to determine the probability of getting the given sum on throwing a pair of dice N times.Probability is the chances of getting the desired output from ... Read More

Priority Queue using Linked List in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 07:15:27

4K+ Views

We are given with the data and the priority as an integer value and the task is to create a linked list as per the priority given and display the result.Queue is a FIFO data structure in which the element which is inserted first is the first one to get ... Read More

Priority Queue using doubly linked list in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 07:10:39

782 Views

We are given with the data and the priority as an integer value and the task is to create a doubly linked list as per the priority given and display the result.Queue is a FIFO data structure in which the element which is inserted first is the first one to ... Read More

C++ Program for Shortest Job First (SJF) scheduling(preemptive)

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 07:02:50

19K+ Views

Given process, the burst time of a process respectively and a quantum limit; the task is to find and print the waiting time, turnaround time and their respective average time using Shortest Job First Scheduling preemptive method.What is the shortest job first scheduling?Shortest job first scheduling is the job or ... Read More

Advertisements