Worst case and average case, Data Structure & Algorithms

Worst Case: For running time, Worst case running time is an upper bound with any input. This guarantees that, irrespective of the type of input, the algorithm will not take any longer time than the worst case time.

Best Case: This guarantees that under any circumstances the running time of algorithms will in any case take this much time.

Average case: It gives the average running time of algorithm. The running time for any provided size of input will be the average number of operations in all problem instances for a given size.

Posted Date: 4/4/2013 6:07:09 AM | Location : United States

Related Discussions:- Worst case and average case, Assignment Help, Ask Question on Worst case and average case, Get Answer, Expert's Help, Worst case and average case Discussions

Write discussion on Worst case and average case
Your posts are moderated
Related Questions
Explain an efficient way of storing two symmetric matrices of the same order in memory. A n-square matrix array is said to be symmetric if a[j][k]=a[k][j] for all j and k. For

Q. Let X = (X1, X2, X3,....Xn) and Y= (Y1, Y2, Y3,....Xm) be the two linked lists respectively. Write down an algorithm to merge the lists together to get the linked list Z such th

State  in brief about assertion Assertion: A statement which should be true at a designated point in a program.

Q. Reverse the order of the elements on a stack S    (i) by using two additional stacks (ii) by using one additional queue. Ans :      L e t S be the stac

In file access: what is the difference between serial, sequential and indexed sequential searching

Write an algorithm by using pseudocode which: Inputs top speeds of 5000 cars Outputs fastest speed and the slowest speed Outputs average speed of all the 5000 cars

Q. Write down an algorithm to convert an infix expression into the postfix expression.     Ans. Algo rithm to convert infix expression to post fix expression is given as

1.  You are required to hand in both a hard copy and an electronic copy of the written report on the project described in A, including all the diagrams you have drawn.  2.  You

The location of a node in a binary search tree is defined as a string such as LLRRL, which represents the node that you find by starting at the root, and traversing Left, traverse