-
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...
A(x) + a(y) = M
Given a1, a2, .... a(n) integers & M, return true or false if there exist a(x) + a(y) = MOnce you're done, do it using a hash table.
Recursion
What is recursion? Which data structure is used for recursion
Compute Average of Two Scores
Describe an algorithm to compute the average of two scores obtained by each of the 100 students
Calculate Money Paid to Each Worker
A carpenter is paid a contract fee of $2000.00 for 3 days work. He hires 3 workers who work for the 3 days at $75.00 a day: calculate and print the amount of money paid to each worker; the total paid to all workers and the amount the carpenter is left with.
To calculate distance between two text strings
Give an algorithm that calculates the distance between two text strings (only operations you can have are: delete, add, and change, one by one).
Pseudocodes and flowcharts
When twice a certain number is subtracted from five times itself, the result equals 60. Find the number by using the try and error method. Use both pseudocode and flowchart.
Ans