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. Reverse the order of the elements on a stack S
(i) by using two additional stacks
(ii) by using one additional queue.
Ans: Let S be the stack having n number of elements. Now we need to reverse the elements of S (i) using the two additional stack S1 and S2
while not empty (S)
{ C=pop(S);
push(S1,C);
}
While not empty(S1)
{ C=pop(S1);
push(S2,C);
While not empty(S3)
{ C=pop(S3);
push(S,C);
(ii) using one additional queue Q
enque(Q,C);
While not empty(Q)
{ C=deque(Q);
Q. Can a Queue be represented by circular linked list with only one pointer pointing to the tail of the queue? Substantiate your answer using an example. A n s . Yes a
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
why the space increase in less time programs
What do you understand by term structured programming? Explain the structured programming as well. Ans. S tructured Programming is expla
Varieties of Arrays In some languages, size of an array should be established once and for all at program design time and can't change during execution. Such arrays are known a
Do you have a library solution for this problem?
Program segment for the deletion of any element from the queue delmq(i) /* Delete any element from queue i */ { int i,x; if ( front[i] == rear[i]) printf("Queue is
What are the properties of an algorithsm?
Suppose there are exactly five packet switches (Figure 4) between a sending host and a receiving host connected by a virtual circuit line (shown as dotted line in figure 4). The tr
Write an algorithm in the form of a flowchart that: inputs top speeds (in km/hr.) of 5000 cars Outputs fastest speed and the slowest speed Outputs average (mean) s
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