<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Data Structure on Vanslog</title>
    <link>https://vanslog.io/categories/data-structure/</link>
    <description>Recent content in Data Structure on Vanslog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Fri, 05 May 2023 22:30:19 +0900</lastBuildDate>
    <atom:link href="https://vanslog.io/categories/data-structure/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Why Use Deque Instead Of Stack</title>
      <link>https://vanslog.io/posts/language/java/why-use-deque-instead-of-stack/</link>
      <pubDate>Fri, 05 May 2023 22:30:19 +0900</pubDate>
      <guid>https://vanslog.io/posts/language/java/why-use-deque-instead-of-stack/</guid>
      <description>&lt;h2 id=&#34;use-deque-instead-of-stack&#34;&gt;Use Deque instead of Stack?&lt;/h2&gt;
&lt;p&gt;When solving algorithm problems using Java, I used to use &lt;code&gt;Deque&lt;/code&gt; instead of &lt;code&gt;Stack&lt;/code&gt;.
While searching online, I often came across posts that suggested using &lt;code&gt;Deque&lt;/code&gt; instead of &lt;code&gt;Stack&lt;/code&gt; class.&lt;/p&gt;
&lt;p&gt;However, I think I was using it vaguely without thinking deeply about why I should use &lt;code&gt;Deque&lt;/code&gt;.
We took this opportunity to learn more about the differences between &lt;code&gt;Stack&lt;/code&gt; and &lt;code&gt;Deque&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A more complete and consistent set of LIFO stack operations is provided by the Deque interface and its implementations, which should be used in preference to this class. For example:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
