Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Determine the greatest common divisor (GCD) of two integers, m & n. The algorithm for GCD might be defined as follows:
While m is greater than zero:
If n is greater than m, swap m and n.
Subtract n from m.
n is the GCD
Code in C
int gcd(int m, int n)
/* The precondition are following: m>0 & n>0. Let g = gcd(m,n). */
{
while( m > 0 )
if( n > m )
{ int t = m; m = n; n = t; } /* swap m & n*/
/* m >= n > 0 */
m - = n;
}
return n;
Define about the inheritance hierarchy Languages Eiffel and D provide constructs in language for invariants and pre- and post conditions which are compiled into the code and ar
I =PR/12 Numbers of years .Interest rate up to 1yrs . 5.50 up to 5yrs . 6.50 More than 5 yrs . 6.75 design an algorithm based on the above information
RGB Model The RGB model is based on the assumption that any desired shade of colour can be obtained by mixing the correct amounts of red, green, and blue light. The exact hues
Which data structure is used for implementing recursion Stack.
Q. In the given figure find the shortest path from A to Z using Dijkstra's Algorithm. Ans: 1. P=φ; T={A,B,C,D,E,F,G,H,I,J,K,L,M,Z} Let L(A)
what is circular doubly link list?write down the algorithm for insertion of elements in circular doubly link list
Dequeue (a double ended queue) is an abstract data type alike to queue, where insertion and deletion of elements are allowed at both of the ends. Like a linear queue & a circular q
Tree is dynamic data structures. Trees can expand & contract as the program executes and are implemented via pointers. A tree deallocates memory whereas an element is deleted.
Example of worse case of time
Q. Suggest a method of implementing two stacks in one array such that as long as space is there in an array, you should be capable to add an element in either stack. Using proposed
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd