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. Write an algorithm that counts number of nodes in a linked list. A n s . Algo rithm to Count No. of Nodes in Linked List C
Q. Define a method for keeping two stacks within a single linear array S in such a way that neither stack overflows until entire array is used and a whole stack is never shifted to
Q. Write down a non recursive algorithm to traverse a binary tree in order. Ans: N on - recursive algorithm to traverse a binary tree in inorder is as
C compiler does not verify the bounds of arrays. It is your job to do the essential work for checking boundaries wherever required. One of the most common arrays is a string tha
Write steps for algorithm for In-order Traversal This process when implemented iteratively also needs a stack and a Boolean to prevent the execution from traversing any portion
what is frequency count with examble
In a doubly linked list, also called as 2 way list, each node is divided into 3 parts. The first part is called previous pointer field. It contains the address of the preceding
Give an algorithm to find both the maximum and minimum of 380 distinct numbers that uses at most 568 comparisons.
If a node in a binary tree is not containing left or right child or it is a leaf node then that absence of child node can be represented by the null pointers. The space engaged by
In internal sorting, all of the data to be sorted is obtainable in the high speed main memory of the computer. We will learn the methods of internal sorting which are following:
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