Home »
» Complexity Of Algorithms
Unknown 11:36:00 AM
Complexity Of Algorithms:
There are two case for describing in the complexity of algorithms:
(1) Worst Case: The Maximum value of f(n) for any possible input.
(2) Average Case: The expected value of f(n)
Sometimes we also consider the minimum possible value of f(n), called the best case.
Suppose, The numbers of n1, n2, ......, nk occur with respective probabilities p1,p2, ........., pk. Then the expectation of average value E is given by
E = n1 p1 + n2 p2 + ................... + nk pk
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :
CSE SOLVE
Related Posts:
Representation Of Linked Lists In Memory
Representation Of Linked Lists In Memory: Let LIST be a linked list. Then LIST will be maintained in memory, unless otherwise specified or implied, as follows. First of all, LIST requires two linear a… Read More
QINSERT(QUEUE, N, FRONT, REAR, ITEM)
QINSERT(QUEUE, N, FRONT, REAR, ITEM)
This procedure inserts an elements ITEM into a queue.
1. [Queue already filled?]
If FRONT = 1 and REAR = N, or … Read More
What is Linked Lists?
Linked Lists: A linked list, or one-way list, is a linear collection of data elements, called nodes, where the linear order is given by means of pointers.The node is divided in the two parts; The first par… Read More
POP(STACK, TOP, ITEM): This procedure deletes the top element of STACK and assigns it to the variable ITEM
1. [Stack has an ITEM to be remove?]
If TOP = 0, then: Print:… Read More
DELLSTH(INFO, LINK START, AVAIL)
Algorithm: DELLSTH(INFO, LINK START, AVAIL)
This algorithm delets the last node from the header list
1. [List empty?] If LINK[START] = NULL, then: Write: UNDERFLOW,a nd Exi… Read More
0 comments:
Post a Comment