{"id":7114,"date":"2022-01-19T11:59:43","date_gmt":"2022-01-19T06:29:43","guid":{"rendered":"https:\/\/www.goseeko.com\/blog\/?p=7114"},"modified":"2022-07-23T17:18:48","modified_gmt":"2022-07-23T11:48:48","slug":"what-is-queue","status":"publish","type":"post","link":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/","title":{"rendered":"What is Queue?"},"content":{"rendered":"\n<p>A <a href=\"https:\/\/en.wikipedia.org\/wiki\/Queue_(abstract_data_type)\" target=\"_blank\" rel=\"noreferrer noopener\">queue<\/a> is an ordered list that allows insert operations to be done at one end (REAR) and delete operations to be performed at the other end (FRONT). The First In First Out list is referred to as a queue.<\/p>\n\n\n\n<p>It is a linear structure that performs operations in a specific order. The order is as follows: First In, First Out (FIFO). Any queue of consumers for a resource where the consumer who arrive first is serve first is an example of a this. The only difference between stacks and queues is how they remove. In a stack, we remove the most recently added item; in a queues, we remove the item that added to the least recently.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/ypAjVD7D6KWw5gvoGWFjk-EaUh-faESxpgZCMXBFek5snYePbFDFGA58nHs5li1AjFWNQQ7rpgQ2G9Qd9okI3w2fdqTROWgoBY3sS7MseP7PPH05AXWf6O95Sc3fZe4SImWgYWn4\" width=\"298\" height=\"169\"><\/p>\n\n\n\n<p>Fig : Queue<\/p>\n\n\n\n<p>For example, create a queue, People in line for a train ticket.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Operation on Queue<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Add <\/strong> &#8211; The enqueue action is uses to add the element to the queue&#8217;s backend. It gives a void result.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Delete <\/strong>&#8211; The dequeue operation is uses to remove items from the queue&#8217;s front end. It also returns the front-end element that remove. It gives you an integer value as a result. It&#8217;s also possible to make the dequeue operation void.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Full (overflow)<\/strong> &#8211; When the queues is totally full, the overflow condition appears.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Empty (underflow)<\/strong> &#8211; The underflow condition is thrown when the Queues is empty, that is, when there are no elements in the Queue.<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Interested in learning about similar topics? Here are a few hand-picked blogs for you!<br><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.goseeko.com\/blog\/what-is-recursion\/\">What is Recursion?<\/a><\/li><li><a href=\"https:\/\/www.goseeko.com\/blog\/what-is-sorting-algorithm\/\">What is Sorting Algorithm?<\/a><\/li><li><a href=\"https:\/\/www.goseeko.com\/blog\/what-is-data-structure\/\">What is data structure?<\/a><\/li><li><a href=\"https:\/\/www.goseeko.com\/blog\/what-is-memory\/\">What is memory?<\/a><\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A queue is a linear structure that performs operations in a specific order.<\/p>\n","protected":false},"author":28,"featured_media":7115,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[36],"tags":[],"class_list":["post-7114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-science-software-engineering-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.3.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is Queue? - Goseeko blog<\/title>\n<meta name=\"description\" content=\".Any queue of consumers for a resource where the consumer who arrive first is serve first is an example of a this.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Queue? - Goseeko blog\" \/>\n<meta property=\"og:description\" content=\".Any queue of consumers for a resource where the consumer who arrive first is serve first is an example of a this.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/\" \/>\n<meta property=\"og:site_name\" content=\"Goseeko blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/goseeko\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-19T06:29:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-23T11:48:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"4096\" \/>\n\t<meta property=\"og:image:height\" content=\"2301\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Gunjan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@goseeko\" \/>\n<meta name=\"twitter:site\" content=\"@goseeko\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gunjan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/\"},\"author\":{\"name\":\"Gunjan\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/#\/schema\/person\/843a7ac71fc4ae8c177dbb7820f2dc9c\"},\"headline\":\"What is Queue?\",\"datePublished\":\"2022-01-19T06:29:43+00:00\",\"dateModified\":\"2022-07-23T11:48:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/\"},\"wordCount\":263,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg?fit=4096%2C2301&ssl=1\",\"articleSection\":[\"Computers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/\",\"url\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/\",\"name\":\"What is Queue? - Goseeko blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg?fit=4096%2C2301&ssl=1\",\"datePublished\":\"2022-01-19T06:29:43+00:00\",\"dateModified\":\"2022-07-23T11:48:48+00:00\",\"description\":\".Any queue of consumers for a resource where the consumer who arrive first is serve first is an example of a this.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg?fit=4096%2C2301&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg?fit=4096%2C2301&ssl=1\",\"width\":4096,\"height\":2301},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.goseeko.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is Queue?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/#website\",\"url\":\"https:\/\/www.goseeko.com\/blog\/\",\"name\":\"Goseeko blog\",\"description\":\"Learning beyond college, Students platform for life skills.\",\"publisher\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.goseeko.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/#organization\",\"name\":\"Goseeko.com\",\"url\":\"https:\/\/www.goseeko.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i1.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2021\/09\/GoSeeko_Stacked-logo-01.png?fit=2471%2C2471&ssl=1\",\"contentUrl\":\"https:\/\/i1.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2021\/09\/GoSeeko_Stacked-logo-01.png?fit=2471%2C2471&ssl=1\",\"width\":2471,\"height\":2471,\"caption\":\"Goseeko.com\"},\"image\":{\"@id\":\"https:\/\/www.goseeko.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/goseeko\",\"https:\/\/x.com\/goseeko\",\"https:\/\/www.instagram.com\/goseeko\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/#\/schema\/person\/843a7ac71fc4ae8c177dbb7820f2dc9c\",\"name\":\"Gunjan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.goseeko.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/603118e8b67d49e1d7409d0214533c962209d94d08d298ce69d8e191ed573faa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/603118e8b67d49e1d7409d0214533c962209d94d08d298ce69d8e191ed573faa?s=96&d=mm&r=g\",\"caption\":\"Gunjan\"},\"url\":\"https:\/\/www.goseeko.com\/blog\/author\/gunjangoseeko\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Queue? - Goseeko blog","description":".Any queue of consumers for a resource where the consumer who arrive first is serve first is an example of a this.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/","og_locale":"en_US","og_type":"article","og_title":"What is Queue? - Goseeko blog","og_description":".Any queue of consumers for a resource where the consumer who arrive first is serve first is an example of a this.","og_url":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/","og_site_name":"Goseeko blog","article_publisher":"https:\/\/www.facebook.com\/goseeko","article_published_time":"2022-01-19T06:29:43+00:00","article_modified_time":"2022-07-23T11:48:48+00:00","og_image":[{"width":4096,"height":2301,"url":"https:\/\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg","type":"image\/jpeg"}],"author":"Gunjan","twitter_card":"summary_large_image","twitter_creator":"@goseeko","twitter_site":"@goseeko","twitter_misc":{"Written by":"Gunjan","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#article","isPartOf":{"@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/"},"author":{"name":"Gunjan","@id":"https:\/\/www.goseeko.com\/blog\/#\/schema\/person\/843a7ac71fc4ae8c177dbb7820f2dc9c"},"headline":"What is Queue?","datePublished":"2022-01-19T06:29:43+00:00","dateModified":"2022-07-23T11:48:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/"},"wordCount":263,"commentCount":0,"publisher":{"@id":"https:\/\/www.goseeko.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg?fit=4096%2C2301&ssl=1","articleSection":["Computers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.goseeko.com\/blog\/what-is-queue\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/","url":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/","name":"What is Queue? - Goseeko blog","isPartOf":{"@id":"https:\/\/www.goseeko.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#primaryimage"},"image":{"@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg?fit=4096%2C2301&ssl=1","datePublished":"2022-01-19T06:29:43+00:00","dateModified":"2022-07-23T11:48:48+00:00","description":".Any queue of consumers for a resource where the consumer who arrive first is serve first is an example of a this.","breadcrumb":{"@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.goseeko.com\/blog\/what-is-queue\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#primaryimage","url":"https:\/\/i0.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg?fit=4096%2C2301&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg?fit=4096%2C2301&ssl=1","width":4096,"height":2301},{"@type":"BreadcrumbList","@id":"https:\/\/www.goseeko.com\/blog\/what-is-queue\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.goseeko.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What is Queue?"}]},{"@type":"WebSite","@id":"https:\/\/www.goseeko.com\/blog\/#website","url":"https:\/\/www.goseeko.com\/blog\/","name":"Goseeko blog","description":"Learning beyond college, Students platform for life skills.","publisher":{"@id":"https:\/\/www.goseeko.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.goseeko.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.goseeko.com\/blog\/#organization","name":"Goseeko.com","url":"https:\/\/www.goseeko.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.goseeko.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i1.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2021\/09\/GoSeeko_Stacked-logo-01.png?fit=2471%2C2471&ssl=1","contentUrl":"https:\/\/i1.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2021\/09\/GoSeeko_Stacked-logo-01.png?fit=2471%2C2471&ssl=1","width":2471,"height":2471,"caption":"Goseeko.com"},"image":{"@id":"https:\/\/www.goseeko.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/goseeko","https:\/\/x.com\/goseeko","https:\/\/www.instagram.com\/goseeko\/"]},{"@type":"Person","@id":"https:\/\/www.goseeko.com\/blog\/#\/schema\/person\/843a7ac71fc4ae8c177dbb7820f2dc9c","name":"Gunjan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.goseeko.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/603118e8b67d49e1d7409d0214533c962209d94d08d298ce69d8e191ed573faa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/603118e8b67d49e1d7409d0214533c962209d94d08d298ce69d8e191ed573faa?s=96&d=mm&r=g","caption":"Gunjan"},"url":"https:\/\/www.goseeko.com\/blog\/author\/gunjangoseeko\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.goseeko.com\/blog\/wp-content\/uploads\/2022\/01\/zichao-zhang-ZAbIO5eas9Q-unsplash.jpg?fit=4096%2C2301&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/posts\/7114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/comments?post=7114"}],"version-history":[{"count":2,"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/posts\/7114\/revisions"}],"predecessor-version":[{"id":8634,"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/posts\/7114\/revisions\/8634"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/media\/7115"}],"wp:attachment":[{"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/media?parent=7114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/categories?post=7114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.goseeko.com\/blog\/wp-json\/wp\/v2\/tags?post=7114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}