-
Importance of Algorithms
What is the importance of algorithms in the field of computer science?
-
Advantages of Circular Queue
Bring out the advantages of circular queue over linear queue
-
Degree Operations
Design an algorithm to show the different operations on degree
-
Compute Average of Two Scores
Describe an algorithm to compute the average of two scores obtained by each of the 100 students
-
-
Recursion
What is recursion? Which data structure is used for recursion
-
-
-
Algorithm Characteristics
List out the characteristics of an algorithm
-
Importance of Algorithm
What is the importance of algorithms in the field of computer science?
-
A car rental firm leases its cars for $250 per day.
A car rental firm leases its cars for $250 per day. The manager gives a discount based on the number of days that the car is rented. If the rental period is greater than or equal to 7 days then a 25% discount is given. Read the period and print the discount given
Sorted Matrix
You are given a matrix. The matrix elements are such that they are sorted both horizontally and vertically. Given an element of the matrix, your job is to obtain its position in an efficient manner.Example: 10 20 30 15 35 98 48 76 110Input: 76Output: 3rd row, 2nd column.
Compute the sum of integers Algorithm
Write an algorithm to compute the sum of integers from 1 to 50 ? please write the answer in descriptive way to solve this ?
Read the heights in inches and wieght in pounds
Read the heights in inches and wieght in pounds of an individual and compute and print their BMI=((weight/height)/height)*703
Post Order Binary Tree Traverse
Design a conventional iterative algorithm to traverse a binary tree represented in two dimensional array in postorder.
Duplicate Elements Array
You have an array of size '2n' of these, 'n+1' elements are distinct and 1 element is repeated 'n' times. You must find the repeated element and say how many times it has repeated. Your solution must use minimum no. of comparisons. Also, say how many comparisons your solution will make in the worst case?
Compute Average of Two Scores
Describe an algorithm to compute the average of two scores obtained by each of the 100 students
Finding a 'circle' in a linked list
You have n numbrer Node objects - could be 1,000,000 for all you know. Each Node has a getNext() method that returns the next Node (a linked list).But the chain of n number of Node objects linked together by the getNext() method, somewhere in the chain, points back to a Node earlier in the chain so if you keep calling getNext() to walk the chain you will never get to the last Node - it will loop forever.What...
Python - How to Write a function
How to Write a function kinda_format ( ) that take three arguments (each of which positive int ) - a,b,c- and tests whether the equality a^n +b^n=c^n holds for each n{2,3,...,10}. The function should return false if the equality does not hold for any value of n in the given range, and if there is a value of n for which the equality holds, the lowest such value (as in int)
Algorithm help
Create the flowchart and algorithm for a module that will prompt the user to enter the amount of cash they have in their pocket. The program should output “Not Enough” ($0 - $0.64), “Vending Machine” ($0.65 - $1.99), “Fast Food” ($2.00 - $4.99), “Cafeteria” ($5.00 - $14.99) or “Steak House” ($15 and up) depending on what the user can afford for lunch.
Ans