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!
Q. Write down an algorithm to merge the two sorted arrays into the third array. Do not perform the sort function in the third array.
Ans:
void merge(int *a,int *b,int n,int m)
{
int i=0,c[20],j=0,k=0,count=0;
while(i<=n&&j<=m)
if(a[i]
c[k]=a[i];
i++;
k++;
}
if(a[i]>b[j])
c[k]=b[j];
j++;
if(a[i]==b[j])
k++; i++; j++;
count++;
if(i<=n&&j==m)
while(i<=n)
if(i==n&&j<=m)
while(j<=m)
for(i=0;i printf("%d\t",c[i]); }
printf("%d\t",c[i]);
Question 1. Explain the different types of traversal on binary tree 2. Explain the Prim's minimum spanning tree algorithm 3. Differentiate fixed and variable storage allo
Write the algorithm for compound interest
B i n a ry Search Algorithm is given as follows 1. if (low > high) 2. return (-1) 3. mid = (low +high)/2; 4. if ( X = = a [mid]) 5. return (mid); 6.
Two linked lists are having information of the same type in ascending order. Write down a module to merge them to a single linked list that is sorted merge(struct node *p, stru
Write an algorithm in form of a flowchart that takes temperatures input over a 100 day period (once per day) and outputs the number of days when temperature was below 20C and numbe
Program: Program segment for insertion of an element into the queue add(int value) { struct queue *new; new = (struct queue*)malloc(sizeof(queue)); new->value = val
(1) (i) Add the special form let to the metacircular interpreter Hint: remember let is just syntactic sugar for a lambda expression and so a rewrite to the lambda form is all t
Acyclic Graphs In a directed graph a path is said to form a cycle is there exists a path (A,B,C,.....P) such that A = P. A graph is called acyclic graph if there is no cycle in
Primitive Data Structure These are the basic structure and are directly operated upon by the machine instructions. These in general have dissimilar representations on different
red black tree construction for 4,5,6,7,8,9
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