Home »
» Example Of Factorial Function
Unknown 10:43:00 AM
Example Of Factorial Function: n! = 1.2.3...............(n-2)(n-1)n
0! = 1 1! = 1 2! = 1.2 = 2 3! = 1.2.3 = 6
4! = 1.2.3.4 = 24 5! = 1.2.3.4.5 = 120 6! = 1.2.3.4.5.6 = 720
and so observe that
5! = 5.4! = 5.24 = 120
This is true for every positive integer n; that is,
n! = n.(n.1)!
(Factorial Function)
(a) If n = 0, then n! = 1.
(b) If n > 0, then n! = n. (n-1)!
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
What is Priority Queues?
Priority Queues: Priority queue is a collection of elements such that element has been assigned a priority and such that the order in which elements are deleted and processes comes from the following rules:
(1) … 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
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
One Way List Representation of a Priority Queue
One Way List Representation of a Priority Queue:
One way to maintain a priority queue in memory is by means of a one-way list, as follows:
(a) Each node in the list will contain three items of information: an … Read More
0 comments:
Post a Comment