Sunidhi Bansal has Published 1078 Articles

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

701 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

340 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 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

233 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

C++ Program for Bisection Method

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Dec-2019 13:04:12

17K+ Views

Given with the function f(x) with the numbers a and b where, f(a) * f(b) > 0 and the function f(x) should lie between a and b i.e. f(x) = [a, b]. The task is to find the value of root that lies between interval a and b in function ... Read More

C++ Program for Priority Scheduling

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Dec-2019 12:43:48

13K+ Views

We are given with the n number of processes i.e. P1, P2, P3, ......., Pn with their corresponding burst times and priorities associated with each process . The task is to find the average waiting time ,average turnaround time and the sequence of process execution using priority CPU scheduling algorithm.What ... Read More

C++ Program for Optimal Page Replacement Algorithm

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Dec-2019 12:20:43

4K+ Views

Given page number and page size; the task is to find number of hits and misses as when we allocate the memory block to a page using Optimal Page Replacement Algorithm.What is Optimal Page Replacement Algorithm?Optimal page replacement algorithm is a page replacement algorithm. A page replacement algorithm is an ... Read More

Java Program for credit card number validation

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Dec-2019 11:42:07

6K+ Views

Given a long number containing digits of a credit card number; the task is to find whether the credit card number is valid or not with a program.For checking a credit card is valid or not, the following are the validations we have to be sure for declaring the result.A ... Read More

C++ Program for Derivative of a Polynomial

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Dec-2019 11:32:06

5K+ Views

Given a string containing the polynomial term, the task is to evaluate the derivative of that polynomial.What is a Polynomial?Polynomial comes from two words: - “Poly” which means “many” and “nomial” means “terms”, which comprises many terms. Polynomial expression is an expression containing variables, coefficients and exponents, which only involves ... Read More

Advertisements