embedded questions!!! - Page 4

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: embedded questions!!!

Quoted text here. Click to load it

I have been programming for many years, but it always nice to get such
clear answers to basic questions.  The old adage, that one is never to
old to learn is still true.

Regards
  Anton Erasmus


Re: embedded questions!!!

Quoted text here. Click to load it
Assume Stack S1,S2;
insert_rear(element)
{
     PUSH(element,S1);
}

delete_front()
{
    for all elements in S1
    {
        element=POP(S1)
        PUSH(element,S2)
    }
   //Now all the elements are in the FIFO order in S2
   //Now if u pop one element in S2 it is nothing but deleting from an
element from the Q
  deleted_from_Q= POP(s2)

 for all elements in  S2
    {
      element=POP(S2)
      PUSH(element,S1);
    }


return deleted_from_Q
}
Quoted text here. Click to load it


Re: embedded questions!!!
If you don't really know what hit you, please consider reading the
following to avoid something like this happening again.

http://www.dtcc.edu/cs/rfc1855.html


Site Timeline