<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Algorithms on jeffyang.io</title>
    <link>https://www.jeffyang.io/tags/algorithms/</link>
    <description>Recent content in Algorithms on jeffyang.io</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>Jeff Yang</copyright>
    <lastBuildDate>Sat, 28 Dec 2019 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.jeffyang.io/tags/algorithms/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>What is a Graph?</title>
      <link>https://www.jeffyang.io/posts/what-is-a-graph/</link>
      <pubDate>Sat, 28 Dec 2019 00:00:00 +0000</pubDate>
      <guid>https://www.jeffyang.io/posts/what-is-a-graph/</guid>
      <description>&lt;p&gt;In this blog post, I will be going over the basics of the graph data structure, including its representation, implementation, and basic graph traversal algorithms. Graph is an important data structure, especially because of its practical applications that can range from representing friendships to maps of locational intelligence, computer networks and much more. Does that sound interesting? Let&amp;rsquo;s dive into learning the basics of graphs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-introduction-to-graphs&#34;&gt;1. Introduction to Graphs&lt;/h2&gt;&#xA;&lt;p&gt;Even if you are unfamiliar with graphs, you most likely have already seen one. If you have seen or worked with &lt;em&gt;trees&lt;/em&gt; before, you have already encountered a &lt;em&gt;graph&lt;/em&gt; before. Let me try to explain graphs in relation to trees, a data structure that you are more likely to be familiar with, or at least more so than graphs. &lt;strong&gt;All trees are graphs, but not all graphs are trees&lt;/strong&gt;. Like trees, graphs also have &lt;strong&gt;nodes (or vertices)&lt;/strong&gt; and &lt;strong&gt;edges&lt;/strong&gt; that connect the nodes, but are not bound to the restrictions that trees have. A tree is an &lt;em&gt;acyclic&lt;/em&gt; and &lt;em&gt;connected&lt;/em&gt; graph. A graph, however, is not limited to such restrictions; a graph can have &lt;em&gt;cycles&lt;/em&gt; and can be &lt;em&gt;disconnected&lt;/em&gt; to form a forest consisting of multiple components that are disconnected with another. Take a look at the following to get a rough idea of what a &lt;em&gt;directed&lt;/em&gt;, &lt;em&gt;acyclic&lt;/em&gt; graph looks like.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Finding the Shortest Path from A to Anywhere</title>
      <link>https://www.jeffyang.io/posts/dijkstras-algorithm/</link>
      <pubDate>Sun, 15 Dec 2019 00:00:00 +0000</pubDate>
      <guid>https://www.jeffyang.io/posts/dijkstras-algorithm/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://www.dropbox.com/scl/fi/mxjzniffmagvv009b904z/dijkstra_cover.png?rlkey=iay4xctdwqmr5hejsun4traqz&amp;amp;st=mq5xxdvj&amp;amp;raw=1&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;In this post, I would like to take a slightly different approach and write about an algorithm that I learned about in a classroom setting. While taking a computer science course in data structures and algorithms this quarter, I found the graph data structure and related algorithms to be particularly fascinating, as graphs can be applied in real-life to represent virtually anything from friendships to geographic maps. Although far from being an expert on this topic, I am going to make an attempt to dissect perhaps the most famous graph algorithm and its practical application. Take a bow, introducing Dijkstra&amp;rsquo;s algorithm and the single source shortest path problem.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
