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!
Evaluate the frequency counts for all statements in the following given program segment.
for (i=1; i ≤ n; i ++)
for (j = 1; j ≤ i; j++)
for (k =1; k ≤ j; k++)
y ++;
Ans.
S1: for (i=1; i<= n; i++) S2: for (j=1; j,= i; j++)
S3 : for (k=1; k<= j; k++) S4 : y++;
Frequency counts of
S1=n
S2 = 1+ (1+2)+ (1+2+3) +....... (1+2+....n)
S3 = 1+ [ 1+ (1+2)] + .....[ 1+ (1+2) +....
(1+2+3+...n)]
S4= same as S3.
We might sometimes seek a tradeoff among space & time complexity. For instance, we may have to select a data structure which requires a lot of storage to reduce the computation tim
Implementation of Stack :- Stacks can be executed in the 2 ways: a) Arrays b) Linked List
differences between direct and indirect recursion
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
A binary tree in which if all its levels except possibly the last, have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is called as
The time required to delete a node x from a doubly linked list having n nodes is O (1)
Q. Write down any four applications or implementation of the stack. Ans. (i) The Conversion of infix to postfix form (ii)
Data Structure and Algorithm 1. Explain linked list and its types. How do you represent linked list in memory? 2. List and elucidate the types of binary tree. 3. Descr
What do we mean by algorithm? What are the characteristics of a good and relevant algorithm? An algorithm is "a step-by-step procedure for finishing some task'' An algorithm c
calculate gpa using an algorithm
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd