Sunidhi Bansal has Published 1100 Articles

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

250 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

3K+ 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

555 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

15K+ 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

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

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 06:52:39

6K+ 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 non-preemptive method.What is the shortest job first scheduling?Shortest job first scheduling is the job or ... Read More

C++ Program for Coefficient of variation

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 06:36:06

560 Views

We are given with an array of float values of size n and the task is to find the coefficient of variation and display the result.What is the coefficient of variation?In statistic measure, coefficient of variation is used to find the range of variability through the data given. In terms ... Read More

C++ Program for Expressionless Face Pattern printing

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 06:33:07

224 Views

Given a number n; the task is to create the Expressionless face pattern upto n lines and display the results. Expressionless face is created using special characters, expressionless face using special character seems like: “*_*”.ExampleInput-: n = 6 Output-:Input-: n = 8 Output-: AlgorithmStart Step 1-> In function print_stars(int i)   ... Read More

C++ Program for First Fit algorithm in Memory Management

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Dec-2019 06:26:47

6K+ Views

Given with the n number of processes and m size of memory blocks and the task is to find the best fit memory block for the corresponding process using the first fit memory management algorithm.What is First Fit Memory Management Algorithm?There is multiple memory partitioning algorithms available which are used ... Read More

C++ Program for sorting variables of any data type

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Dec-2019 14:01:57

1K+ Views

We are given with the values of different datatypes like it can be of type integer, float, string, bool, etc. and the task is to sort the variables of any data type using one common method or function and display the result.In C++, we can use std::sort to sort any ... Read More

Product of non-repeating (distinct) elements in an Array in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Dec-2019 13:24:19

143 Views

We are given with an array of repeating or duplicate elements and the task is to find the product of all those elements which are non-repeating or distinct in the given array and display the results.ExampleInput-: arr[] = {2, 1, 1, 2, 3, 4, 5, 5 } Output-: 120 Explanation-: ... Read More

Advertisements