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]);
Q. Give the adjacency matrix for the graph drawn below: Ans: Adjacency matrix for the graph given to us
Let a be a well-formed formula. Let c be the number of binary logical operators in a. (Recall that ?, ?, ?, and ? are the binary logical operators). Let s be the number of proposit
This question is based on the requirements of a system to record band bookings at gigs. (A 'gig' is an event at which one or more bands are booked to play). You do not need to know
Explain the Memory Function method The Memory Function method seeks to combine strengths of the top down and bottom-up approaches to solving problems with overlapping su
a) Find the shortest paths from r to all other nodes in the digraph G=(V,E) shown below using the Bellman-Ford algorithm (as taught in class). Please show your work, and draw the f
Post-order Traversal This can be done both iteratively and recursively. The iterative solution would need a change of the in-order traversal algorithm.
Explain the bubble sort algorithm. Answer This algorithm is used for sorting a list. It makes use of a temporary variable for swapping. It compares two numbers at an insta
Use a random number generator to create 10 numbers between 1 and 1000 and store them in 2 different arrays. The first array should contain the numbers as they are generated. The
1. Using the traditional method of CPM: a. What activities are on the critical path? b. What is the expected total lead time of the project? 2. Using CCPM: a. What
Overlapping or Intersecting A polygon overlaps or intersects the current background if any of its sides cuts the edges of the viewport as depicted at the top right corner of th
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