<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: yluo3421</title>
    <description>The latest articles on DEV Community by yluo3421 (@yluo3421).</description>
    <link>https://dev.to/yluo3421</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F853241%2Fe3337361-defc-45d4-b128-6b4d3c401658.jpeg</url>
      <title>DEV Community: yluo3421</title>
      <link>https://dev.to/yluo3421</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yluo3421"/>
    <language>en</language>
    <item>
      <title>Sharing Leetcode Solution</title>
      <dc:creator>yluo3421</dc:creator>
      <pubDate>Sun, 18 Sep 2022 00:34:28 +0000</pubDate>
      <link>https://dev.to/yluo3421/sharing-leetcode-solution-4d2k</link>
      <guid>https://dev.to/yluo3421/sharing-leetcode-solution-4d2k</guid>
      <description>&lt;p&gt;After last week, I have hosted 5 sessions on solving leetcode together. A bunch of easy questions, 3 medium questions and 1 hard question. &lt;br&gt;
I learnt a lot during the sharing. There are basic concepts that I didn't fully understand but I start using. Sometimes I assumed my thoughts are fully explained while the reality is that those thoughts never get out of my head. My sharing sometimes only consider my understanding rather than take audiences' pace into consideration.&lt;br&gt;
Most importantly, I realized the difficulty of explanation. If solving leetcode questions requires some understanding on the techniques needed for solution, then sharing and even teaching require understanding of the concepts to not only details but also one symbol. Questions could be from anywhere or about anything. I could still be able to adapt, sometimes I get prepared while other times I will look up the questions and test them out together with my friends.&lt;br&gt;
I was suggested about an extension called LeetHub, which is useful not only that it help me upload my submission on leetcode to GitHub. But it also contains the problem description and all graphs. This makes things a lot better.&lt;br&gt;
Next week I need to leave for a travel so I have to pause. Will continue when I get back. Ohh I should start video explanation which saves time (maybe).&lt;br&gt;
&lt;a href="https://github.com/yluo3421/Leetcode-Solutions&amp;lt;br&amp;gt;%0A!%5BImage%20description%5D(https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iho3bbu0z95puote6zas.jpeg)"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>leetcode</category>
    </item>
    <item>
      <title>Repo that shares Leetcode solutions</title>
      <dc:creator>yluo3421</dc:creator>
      <pubDate>Tue, 13 Sep 2022 18:35:13 +0000</pubDate>
      <link>https://dev.to/yluo3421/repo-that-shares-leetcode-solutions-1ego</link>
      <guid>https://dev.to/yluo3421/repo-that-shares-leetcode-solutions-1ego</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/yluo3421/Leetcode-Solutions"&gt;LeetCode Solutions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--THbEIiHt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6eezenfrg5wv8r3aclw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--THbEIiHt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6eezenfrg5wv8r3aclw.png" alt="Image description" width="880" height="530"&gt;&lt;/a&gt;&lt;br&gt;
After finishing more than 200 questions on leetcode. I realize there are so many questions that I have done and I thought I understood later turned out I cannot solve them the second time.&lt;br&gt;
I realized there might be a lot of other people who has similar situation with me. I decided to make some changes on how I do leetcode problems.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do not look at answers!&lt;/li&gt;
&lt;li&gt;Treat it like an interview, take 10 min to start basic thoughts.&lt;/li&gt;
&lt;li&gt;If the pseudo code can be generated, check logic and corner cases&lt;/li&gt;
&lt;li&gt;If pseudo code cannot be found, check hints. Sometimes it's an algorithm or data structure should be utilized to solve the problem.&lt;/li&gt;
&lt;li&gt;If no progress in 10 min after hint, watch video explanations and then work it out without looking at answers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After taking the strategy above I can feel the progress I made and also gain more confidence. This leads me to share my thoughts during solving the problems, I think these might become a hint for whoever doing the same questions.&lt;br&gt;
So I started the repo following the same pattern of Neetcode (The author is so good!).&lt;br&gt;
The repo started about 2 weeks ago and I realize it might be more helpful if I can provide some video explanations. But this is an area I have never touched. The idea of video meeting with whoever interested rises. &lt;br&gt;
I started to give video meeting link in my Flatiron cohorts. At first two sessions I gave out more easy questions cause I don't want to scare whoever didn't start leetcode. But on the contrast, the speed of my explanation of my thoughts are still fast that makes my classmates not interested in solving this. &lt;br&gt;
Until recently I found one classmate who can follow my thoughts. That we solved a hard level leetcode question in two hours gave me lots of boosts. Even though the second day he told me about the same issue that I went too fast. &lt;br&gt;
I will keep sharing the leetcode questions I have worked on and try to start video explanation in about two weeks. Have to remind me that I shall try to explain questions like explaining to someone never touched programming.&lt;br&gt;
Feel free to check my GitHub and the repo. All comments welcomed.&lt;/p&gt;

</description>
      <category>leetcode</category>
      <category>python</category>
      <category>github</category>
      <category>thinkoutloud</category>
    </item>
    <item>
      <title>Starting project about Path Finding</title>
      <dc:creator>yluo3421</dc:creator>
      <pubDate>Mon, 01 Aug 2022 14:27:04 +0000</pubDate>
      <link>https://dev.to/yluo3421/starting-project-about-path-finding-47fn</link>
      <guid>https://dev.to/yluo3421/starting-project-about-path-finding-47fn</guid>
      <description>&lt;p&gt;Game is one of my hobbies and I always wonder why do they have so many ideas that can lead people to keep playing and enjoying the game. I have seen vlog about making their own game using model but currently all I had is React and rails, so I decided to start by path-finding. It is the root to whatever games that needs a map.&lt;br&gt;
I looked up online and found lots of people already had decent projects about path-finding, this is good because I have a lot of references to use. After watching several videos and reading some articles, I found the best topic to work on, path-finding algorithm visualization. To me algorithm itself is not that interesting, but understanding what problems can it solve really helps me get to know algorithm. Among all the method of understanding a algorithm, I found visualization the most direct and fitting all age-groups. The only drawback of this project is it is front-end heavy and I do need to fulfill the requirement for backend.&lt;br&gt;
The ultimate goal is to do similar thing as Clément Mihailescu, his website and path-finding algorithm looks amazing. After watching his video of re-doing the website, I found it really hard. The amount of code needs to be done is massive and I only have limited time. The decision is still finishing the similar website as Clément's but simplify by not implementing partial features by myself. I will focus on implementing path-finding algorithm and visualization. But the first step is initialize the board and nodes.&lt;/p&gt;

</description>
      <category>pathfinding</category>
    </item>
    <item>
      <title>React Project</title>
      <dc:creator>yluo3421</dc:creator>
      <pubDate>Thu, 26 May 2022 20:50:14 +0000</pubDate>
      <link>https://dev.to/yluo3421/react-project-3fof</link>
      <guid>https://dev.to/yluo3421/react-project-3fof</guid>
      <description>&lt;p&gt;Facebook created React.js in 2011 for their own use. As you know, Facebook is one of the biggest Social Networking websites in the world today.&lt;/p&gt;

&lt;p&gt;In 2012, Instagram also started using it, which is a subsidiary of Facebook.&lt;/p&gt;

&lt;p&gt;In 2013, Facebook made React.js open-sourced. Initially, the developer community rejected it because it used Markup and JavaScript in a single file. But as more people experimented with it, they started embracing the component-centric approach for separating concerns.&lt;/p&gt;

&lt;p&gt;When I first start studied react, I felt the concept are similar to what we had in javascript but somehow it's not the same. The same patter also happened when we later get into practice code challenge, with some example I can finish the coding and make it compiles. But I don't feel the happiness of making it because I don't fully understand why it works. Only after working on greglist, plantsy and some other mock challenge it became clear to me.&lt;/p&gt;

&lt;p&gt;But I want to recommend because React is remarkably flexible. Once you have learned it, you can use it on a vast variety of platforms to build quality user interfaces. React is a library, NOT a framework. '&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_KTzSLt8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kk7wy8pskjfngs7ibvy4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_KTzSLt8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kk7wy8pskjfngs7ibvy4.png" alt="Image description" width="325" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>programming</category>
    </item>
    <item>
      <title>Flatiron Phase1</title>
      <dc:creator>yluo3421</dc:creator>
      <pubDate>Thu, 12 May 2022 20:13:12 +0000</pubDate>
      <link>https://dev.to/yluo3421/flatiron-phase1-15pi</link>
      <guid>https://dev.to/yluo3421/flatiron-phase1-15pi</guid>
      <description>&lt;p&gt;In this blog, I will take a look at 2 commonly used algorithms and address the benefits and caveats for each algorithm:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Bubble Sort&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quick Sort&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bubble sort&lt;/strong&gt; is a simple sorting algorithm.&lt;br&gt;
It iterates through the list and find two item i and i + 1, if list[i] is larger than list[i + 1], swap the two item.&lt;br&gt;
The worst complexity it can reach is O(n^2).&lt;br&gt;
It's easier to understand but not useful for large amount of data. One possible application is to list mostly sorted.&lt;/p&gt;

&lt;p&gt;Below is what I wrote based on my understanding&lt;br&gt;
while sorted == False:&lt;br&gt;
    sorted = True&lt;br&gt;
    for i in range(len(list) - 1):&lt;br&gt;
        if list[i] &amp;gt; list[i + 1]:&lt;br&gt;
            list[i], list[i + 1] = list[i + 1], list[i]&lt;br&gt;
            sorted = False&lt;br&gt;
print(list)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick Sort&lt;/strong&gt; has an average complexity of O(nlog(n)) but worst case is O(n^2). It's one of the most often used divide and conquer algorithm. The pseudo code is below &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select a pivot for the array, I will use rightmost element in this case&lt;/li&gt;
&lt;li&gt;Partitioning: this is an important step, elements smaller than pivot at partitioned to the left, and elements greater than pivot are partitioned to the right. 
3.Once all elements are iterated, pivot will be switched with the last item larger than pivot. So that on the left, all elements are smaller than pivot. On the right, all elements are larger than pivot. Neither side needs to be in order.&lt;/li&gt;
&lt;li&gt;After partitioning, the process will be run again for the left and right partition of the array.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pXzD3h9J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yy394lcyolophix759m1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pXzD3h9J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yy394lcyolophix759m1.png" alt="Image description" width="847" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quick sort is efficient and doesn't require extra memory to do the recursion (like merge sort)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>algorithms</category>
    </item>
  </channel>
</rss>
