Logo 
Search:

Assembly Language Forum

Ask Question   UnAnswered
Home » Forum » Assembly Language       RSS Feeds

The binomial coefficients can be defined as follows:

  Asked By: John    Date: Dec 14    Category: Assembly Language    Views: 1738
  

Can Someone Please provide assembly codes for this two. thank you.

a. The binomial coefficients can be defined as follows:
C(0,0) = 1, C(n,0) = 1, C(n,n) = 1
C(n,k) = C(n-1,k) + C(n-1,k-1), if 0 < k < n.







b. Find the largest entry in an array of N integers:
If (N=1) {FindMax(A[1]) = A[1]}
Else
{FindMax(A[1],…,A[N]) =
Maximum(A[N],FindMax(A[1],…,A[N-1]))
Hint: Pass parameters on the Stack
During each call to FindMax, create an Activation Record
that saves the input parameters
and local variables, if any.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on The binomial coefficients can be defined as follows: Or get search suggestion and latest updates.




Tagged: