Sunidhi Bansal has Published 1085 Articles

Priority Queue Introduction in C/C++

Sunidhi Bansal

Sunidhi Bansal

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

526 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

345 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

731 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

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

Sunidhi Bansal

Sunidhi Bansal

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

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

683 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

310 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

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

Advertisements