Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    May 2016
    Posts
    53

    What’s difference between Stack and Queue?


  2. #2
    Registered User
    Join Date
    May 2016
    Posts
    26
    Stack and Queue both are used as placeholder for a collection of data. The primary difference between a stack and a queue is that stack is based on Last in First out (LIFO) principle while a queue is based on FIFO (First In First Out) principle.

    introduction to programming
    oracle dba training java se 8 programming itil service operation training

  3. #3
    Registered User
    Join Date
    Nov 2013
    Posts
    56
    Stack is toward the end in first out(LIFO). that is which is entered last will be recovered firstly. case of stack is arranging plates in one above one.
    Line is first in first out(FIFO). That is which is entered first will be served first. Example is standard line in temporary store.
    Download Wordpress Plugins
    Last edited by forum1; 05-30-2016 at 05:47 AM.

  4. #4
    Registered User
    Join Date
    Apr 2015
    Location
    New Delhi
    Posts
    679
    A stack is defined as a list or sequence of elements that is lengthened by placing new elements "on top" of existing elements and shortened by removing elements from the top of existing elements. It is an ADT[Abstract Data Type] with math operations of "push" and "pop".

    A queue is a sequence of elements that is added to by placing the new element at the rear of existing and shortened by removing elements in front of queue. It is an ADT[Abstract Data Type]. There is more to these terms understood in programming of Java, C++, Python and so on.

  5. #5
    Member
    Join Date
    May 2016
    Posts
    50
    Queue:
    Queue is a ordered collection of items.
    Items are deleted at one end called ‘front’ end of the queue.
    Items are inserted at other end called ‘rear’ of the queue.
    The first item inserted is the first to be removed (FIFO).
    Stack:
    Stack is a collection of items.
    It allows access to only one data item: the last item inserted.
    Items are inserted & deleted at one end called ‘Top of the stack’.
    It is a dynamic & constantly changing object.
    All the data items are put on top of the stack and taken off the top
    This structure of accessing is known as Last in First out structure (LIFO)

  6. #6
    Member
    Join Date
    Apr 2016
    Location
    India
    Posts
    42
    Traditionally, Queues and Stacks are used as containers to hold objects and retrieve them out in a specific order, which facilitates different types of operations. A Stack operates as a First In Last Out (FILO) container while a Queue operates as a First In First Out (FIFO) container.

  7. #7

  8. #8
    Senior Member
    Join Date
    Nov 2013
    Posts
    347
    Stack is a last in first out data structure. The associated link to wikipedia contains detailed description and examples. Queue is a first in first out data structure. The associated link to wikipedia contains detailed description and examples, as stackoverflow website explained.
    Last edited by Olin Lamanna; 06-02-2016 at 07:38 AM.

  9. #9
    Junior Member
    Join Date
    May 2016
    Location
    Toronto
    Posts
    5
    Stack is based on pancakes and Q is a letter.
    ██ WPCYCLE MANAGED WORDPRESS WEB HOSTING ██
    Managed WordPress Virtual Private Servers & Managed WordPress Dedicated Servers
    WordPress Brute Force-XMLRPC Protection • SSD • PHP7 • NGINX • Backups • Optimized
    Email: sales@wpcycle.comFacebook: wpcycle • Twitter: wpcycle

  10. #10
    Member
    Join Date
    May 2016
    Posts
    76
    insert a new item, and remove an item two basic operations in stack and queue
    first-in-first-out or FIFO The rule used for a stack . last-in first-out or LIFO The rule used for a QUEUE
    CertifyGuide – The Ultimate Source of Certification Exam Preparation Guides

  11. #11
    Registered User
    Join Date
    Jan 2016
    Posts
    613
    A stack is defined as a list or sequence of elements that is lengthened by placing new elements "on top" of existing elements and shortened by removing elements from the top of existing elements.
    A queue is a sequence of elements that is added to by placing the new element at the rear of existing and shortened by removing elements in front of queue. It is an ADT[Abstract Data Type]. There is more to these terms understood in programming of Java, C++, Python and so on.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.