## Stack making use of the linked list, Data Structure & Algorithms

Assignment Help:

Q. Implement a stack making use of the linked list. Show the PUSH and POP operations both.

Ans.

# include

# include

{

int info ;

}   *start;

{

printf ("\n Input the new value for next location of the stack:") ;

new_rec = (struct link *) malloc (size of

scanf ("%d", &new_rec->info) ;

new_rec->next = rec;

rec = new_rec;

return (rec);

}

{

if (rec == NULL)

{

}

else

{

printf ('\n Stack is empty") ;

temp = rec; rec= temp->next;

printf("the popped element %d", temp->.info);

free(temp) ;

return(rec);

}

#### Tower of management, what is tower of management with example

what is tower of management with example

#### Explain the halting problem, Explain the halting problem Given a comput...

Explain the halting problem Given a computer program and an input to it, verify whether the program will halt on that input or continue working indefinitely on it.

#### Explain in brief the asymptotic notations, Question 1 Write the different ...

Question 1 Write the different characteristics of an algorithm Question 2 Explain in brief the asymptotic notations Question 3 Write an algorithm of insertion sort and e

#### The complexity of multiplying two matrices, The complexity of multiplying t...

The complexity of multiplying two matrices of order m*n and n*p is    mnp

#### Define big omega notation, Define Big Omega notation Big Omega notatio...

Define Big Omega notation Big Omega notation (?) : The lower bound for the function 'f' is given by the big omega notation (?). Considering 'g' to be a function from the non-n

#### Determine the greatest common divisor, Determine the greatest common diviso...

Determine the greatest common divisor (GCD) of two integers, m & n. The algorithm for GCD might be defined as follows: While m is greater than zero: If n is greater than m, s

#### Add the special form let to the metacircular interpreter, (1)  (i) Add the ...

(1)  (i) Add the special form let to the metacircular interpreter Hint: remember let is just syntactic sugar for a lambda expression and so a rewrite to the lambda form is all t

#### First class Abstract data type , 3. A function to convert a complex number ...

3. A function to convert a complex number in algebraic form to a complex number in phasor form

#### Infix to postfix, [(a+b)/(c+d)^(e+f)]+(g+h)/i

[(a+b)/(c+d)^(e+f)]+(g+h)/i  