-
Traverse Binary Tree in Inorder
Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in inorder.
-
Algorithm to Traverse Binary Tree
Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in preorder.
-
Conventional Iterative Algorithm
Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in postorder.
-
Importance of Algorithms
What is the importance of algorithms in the field of computer science?
-
Write an algorithm to read the date borrowed and present date.
A video club rents video for three days. Write an algorithm to read the date borrowed and the present date; calculate the number of days borrowed. If the number of days exceeds three days, compute the number of days overdue and overdue charge. Use a rate of $1.50 for everyday overdue or part overdue
-
Algorithm to input the price of a textbook
Write an algorithm to input the price of a textbook. Calculate the price and print the total cost of the book after 15% VAT is added
-
Degree Operations
Design an algorithm to show the different operations on degree
-
Distinct palindromic sub strings
I want to calculate number of DISTINCT palindromic substrings in a string.How to do it?
Like if aba is string the their are 3 distinct palindromic subsrings:{a,aba,b}
length of string could be 10^5 range.So i dont think O(n^2) solution will work.I want a algorithm to do this in less than O(n^2). -
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.
-
Calculate Number of Oil Pipes Required
Pipes are laid by an oil company. If the company has to laid down 3 km of pipe and each pipe is 25 metres long, calculate and print the number of pipes needed to cover the distance.
-
Read the Day and the Weather
A club plays cricket only on Sundays and only if it is not raining. Read the day and the weather and "Game on" if the weather is good and the day is Sunday, or "Play Suspended" if it is not Sunday and it is raining.
-
-
Sub matrix
U are given a n*n square matrix where each element is either 0 or 1....u have to find the square submatrix with the largest length such that all the elements along the border of that square submatrix matrix is 1 ....
-
Characteristics of an Algorithm
List out the characteristics of an algorithm
-
Post Order Binary Tree Traverse
Design a conventional iterative algorithm to traverse a binary tree represented in two dimensional array in postorder.
-
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
-
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
Compute Average of Two Scores
Describe an algorithm to compute the average of two scores obtained by each of the 100 students
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 ?
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...
Ans