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!
include
int choice, stack[10], top, element;
void menu();
void push();
void pop();
void showelements();
void main()
{
choice=element=1;
top=0;
menu();
}
void menu()
printf("Enter any options from following:\n");
printf("PUSH 1\n POP 2\n DISPLAY ELEMENTS 3\n EXIT 4\n");
scanf("%d", &choice);
if (choice==1)
push();
if (choice==2)
pop();menu();
if (choice==3)
showelements();
void push()
if (top<=9)
printf("Enter any element to be pushed to stack:\n");
scanf("%d", &element);
stack[top]=element;
++top;
else
printf("Stack full\n");
return;
void pop()
if (top>0)
--top;
element = stack[top];
printf("Popped element:%d\n", element);
printf("Stack empty\n");
void showelements()
if (top<=0)
for(int i=0; i printf("%d\n", stack[i]); }
printf("%d\n", stack[i]);
Q. Let X = (X1, X2, X3,....Xn) and Y= (Y1, Y2, Y3,....Xm) be the two linked lists respectively. Write down an algorithm to merge the lists together to get the linked list Z such th
Explain the Interfaces in Ruby Recall that in object-oriented programming, an interface is a collection of abstract operations that cannot be instantiated. Even though Ruby i
What is an algorithm? What are the characteristics of a good algorithm? An algorithm is "a step-by-step process for accomplishing some task'' An algorithm can be given in many
Example which cause problems for some hidden-surface algorithms Some special cases, which cause problems for some hidden-surface algorithms, are penetrating faces and cyclic ov
Q. An, array, A comprises of n unique integers from the range x to y(x and y inclusive where n=y-x). Which means, there is only one member that is not in A. Design an O(n) time alg
One can change a binary tree into its mirror image by traversing it in Postorder is the only proecess whcih can convert binary tree into its mirror image.
Explain in detail the algorithmic implementation of multiple stacks.
Mid Square method with good example
Ruby implements Range of T Abstract data type Ruby implements Range of T ADT in its Range class. Elements of carrier set are represented in Range instances by recording interna
Advantages of First in First out (FIFO) Costing Advantages claimed for first in first out (FIFO) costing method are: 1. Materials used are drawn from the cost record in
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