<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by The Code Panda on Medium]]></title>
        <description><![CDATA[Stories by The Code Panda on Medium]]></description>
        <link>https://medium.com/@thecodepanda?source=rss-3fc0ca1f89cc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*mxDFKzHkGrzBCKjC</url>
            <title>Stories by The Code Panda on Medium</title>
            <link>https://medium.com/@thecodepanda?source=rss-3fc0ca1f89cc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 14:35:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thecodepanda/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Recursion: Why I keep Calling Myself]]></title>
            <link>https://interviewnoodle.com/recursion-why-i-keep-calling-myself-87b2b2197259?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/87b2b2197259</guid>
            <category><![CDATA[recursion]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[programming-languages]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Mon, 12 Sep 2022 05:37:32 GMT</pubDate>
            <atom:updated>2022-09-12T20:36:57.130Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Fellows, I am Domino. First of all, sorry for not being able to upload any article or share anything. Someone from our team (Mr. Guy), blows up our system.</p><blockquote>For God&#39;s Sake, Mr. Guy… that wire doesn’t start your coffee machine. Please let me upload my article, don&#39;t mess with the internet…</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T-k7D6H6W2PDbAQ9XqLwCg.png" /></figure><p>Sorry Guys, Let&#39;s start today&#39;s confusing topic, “Recursion.” Recursion, in simpler words, can easily be understood by using this meme:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*r671-vt0sjzlZSTcm-h_Zg.jpeg" /></figure><p>Yes, Just like the above image, recursion in simple terms is <strong><em>“Function calling itself”</em></strong>. I know you have heard this statement a lot but in today&#39;s article, we are going to explore its <strong>meaning</strong>, how to <strong>use</strong> it, <strong>time complexity finding</strong>, and <strong>types of recursion</strong>.</p><h3>What is R<strong>ecursion:</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*05HgpRTT55UUDafrbBA-XA.png" /></figure><blockquote>Mr. Guy, Recursion doesn&#39;t mean you keep repeating your name? Please be patience and listen me properly.</blockquote><p>Recursion is the process in which the function calls itself directly or indirectly until it reaches its base condition.</p><h4>Conditions for Recursion:</h4><ol><li>A recursive algorithm must have a base condition.</li><li>A recursive algorithm must change its state and move toward the base case.</li></ol><blockquote><strong><em>Base Condition?</em></strong></blockquote><p>Base condition is the condition where the function came to know when to quit that loop.</p><h4>When &amp; Where To Use Recursion:</h4><p>You have been in a situation where you call your function from the loop again and again until the loop ends. You can understand recursion as a <strong><em>function in a loop</em></strong> that keeps repeating itself until in a condition where the loop terminates.<br>Let&#39;s see it by an example in both function in a loop and recursion:</p><pre>function mul(sum,n){<br>return sum*n<br>}</pre><pre>let sum = 1<br><strong>for</strong>(i=1;i&lt;=num;i++) {<br> sum = mul(sum,n);<br>}</pre><h4>OR</h4><pre>function factorialRecursion(n) {<br> if (n == 1) { <br> return 1; <br>} <br>return n * factorialRecursion(n — 1); <br>}</pre><h3>Examples Of Recursion:</h3><p>Recursion is made for <strong>solving problems that can be broken down into smaller, repetitive problems</strong>.<br>Using recursion, we can easily solve many complex problems very easily. Problems like <br>- Tower of Hanoi, <br>- Tree traversal,<br>- Factorial Number and many more.</p><p>Example-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*QJMCXeZhVuljiqdaBYMLSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*mm5g4S64wFtYagXAh3Hggg.png" /></figure><blockquote>You heard Mr. Guy, There should be a base condition… Find your base condition… and stop repeating your name.</blockquote><h3><strong><em>Time Complexity:</em></strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*upg8Ror6PjPWIgzYgvsvYw.png" /></figure><p>The time complexity of recursion <strong>depends on two factors: <br>1) Total number of recursive calls and <br>2) Time complexity of additional operations for each recursive call</strong></p><pre>int recursiveFun1(int n)<br>{<br>    if (n &lt;= 0)<br>        return 1;<br>    else<br>        return 1 + recursiveFun1(n-1);<br>}</pre><p>This function is being called recursively n times before reaching the base case so its O(n), often called <strong>linear</strong>.</p><pre>int recursiveFun2(int n)<br>{<br>    if (n &lt;= 0)<br>        return 1;<br>    else<br>        return 1 + recursiveFun2(n-5);<br>}</pre><p>This function is called n-5 for each time, so we deduct five from n before calling the function, but n-5 is also O(n). (Actually called order of n/5 times. And, O(n/5) = O(n) ).</p><pre>int recursiveFun3(int n)<br>{<br>    if (n &lt;= 0)<br>        return 1;<br>    else<br>        return 1 + recursiveFun3(n/5);<br>}</pre><p>This function is log(n) base 5, for every time we divide by 5 before calling the function so it O(log(n))(base 5), often called <strong>logarithmically</strong> and most often Big O notation and complexity analysis uses base 2.</p><pre>void recursiveFun4(int n, int m, int o)<br>{<br>    if (n &lt;= 0)<br>    {<br>        printf(&quot;%d, %d\n&quot;,m, o);<br>    }<br>    else<br>    {<br>        recursiveFun4(n-1, m+1, o);<br>        recursiveFun4(n-1, m, o+1);<br>    }<br>}</pre><p>Here, it’s O(2^n), or <strong>exponential</strong>, since each function call calls itself twice unless it has been recursed <strong>n</strong> times.</p><pre>int recursiveFun5(int n)<br>{<br>    for (i = 0; i &lt; n; i += 2) {<br>        // do something<br>    }</pre><pre>    if (n &lt;= 0)<br>        return 1;<br>    else<br>        return 1 + recursiveFun5(n-5);<br>}</pre><p>And here the for loop takes n/2 since we’re increasing by 2, and the recursion takes n/5 and since the for loop is called recursively, therefore, the time complexity is in</p><p>(n/5) * (n/2) = n²/10,</p><p>due to Asymptotic behavior and worst-case scenario considerations or the upper bound that big O is striving for, we are only interested in the largest term so O(n^2).</p><p>Special Thanks to <a href="https://stackoverflow.com/questions/13467674/determining-complexity-for-recursive-functions-big-o-notation"><strong><em>Stackoverflow&#39;s</em></strong></a> answer for the above details.</p><h3>Types of Recursion</h3><p>Generally, there are four types of recursion, and are -</p><p>1. Direct Recursion</p><p>2. Indirect Recursion</p><p>3. Tail Recursion</p><p>4.Non-Tail Recursion / Head Recursion</p><h4>1) Direct Recursion:-</h4><p>A function is said to be a recursive function if it calls the same function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*O29RLHm1Oe5w_uwmvkAueA.png" /></figure><h4>2) Indirect Recursion:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*7S2hwuDy8fTO4c6FtlNADg.png" /></figure><p>A function (let fun1) is said to be indirect recursive if it calls another function(fun2) and then fun2 calls fun1 directly or indirectly.</p><h4>3) Tail Recursion:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*YZPlwnsH1e8NJbv4PjXPYQ.png" /></figure><p>A function is said to be tail recursive if the recursive call is the last thing done by the function.</p><h4>4) Non-Tail Recursion:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*f0ng2bGlkNO6V3b2iwTaUw.png" /></figure><p>A function is said to be Head Recursion if the recursive call is not the last thing done by the function. It means some statements are left out, that need to be executed.</p><h3>Summary:</h3><blockquote>Okay We are done… now you can stop annoying me Mr. Guy. Let’s stable <strong><em>Panda HQ’s</em></strong> Internet.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*X-cuNHeFtTvWOgpuun85mA.png" /></figure><h3>ABOUT US</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ldiI99thKPe_A4LZbqsnzA.png" /></figure><p><a href="https://thecodepanda.in/"><strong><em>The Code Panda</em></strong></a> is a programming practice platform for every programmer out there. Upgrade your skills with catching coding problems and MCQs-based assignments to enhance your coding skill.</p><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, or <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read <a href="https://thecodepanda.medium.com/25-algorithm-you-must-know-a-rubics-edition-9d1816f72720?source=user_profile---------0----------------------------"><strong><em>25 Algorithm You Must Know: A Rubics Edition</em></strong></a><strong><br></strong>Read: <a href="https://thecodepanda.medium.com/do-you-want-to-feel-data-structures-a-kinda-roadmap-c65c7b78510?source=user_profile---------5----------------------------"><strong><em>Do you want to feel Data Structures?: A Kinda Roadmap</em></strong></a><strong><br></strong>Read: <a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------0----------------------------"><strong><em>Searching &amp; Sorting</em></strong></a><strong><em><br></em></strong>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong><em>Let’s Draw a Roadmap for Competitive Coding</em></strong></a><strong><br></strong>Read <a href="https://thecodepanda.medium.com/time-space-game-lets-find-complexity-of-my-code-a1e53288a437?source=user_profile---------9----------------------------"><strong><em>Time &amp; Space Game: Let’s Find Complexity of My Code</em></strong></a></p><p>If you are a beginner, you can start your coding journey with us our <a href="https://thecodepanda.in/codelab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading this article this far. Please share your viewpoints in the comments and topics on which you want an article.<br><strong>Thank you. See you soon!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87b2b2197259" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/recursion-why-i-keep-calling-myself-87b2b2197259">Recursion: Why I keep Calling Myself</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All 24 CSS Viewport Units Explained]]></title>
            <link>https://interviewnoodle.com/all-24-css-viewport-units-explained-a44cc92e26a5?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/a44cc92e26a5</guid>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[css3]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Tue, 23 Aug 2022 03:38:40 GMT</pubDate>
            <atom:updated>2022-08-26T05:43:22.336Z</atom:updated>
            <content:encoded><![CDATA[<p>CSS used to simplest have 4 viewport devices you had to recognize and that they had been capable of cowl quite a good deal each use case imaginable. As time went on, though, and the era changed, those 4 viewport devices had been now not sufficient to address all use cases. Because of this CSS delivered 20 greater viewport devices which feels like a lot, however, they may be damaged down into six principal viewport devices with 3 precise modifiers giving us a complete 24 combinations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Qq611IOgZz1UBwqpz_wGxA.png" /><figcaption>All 24 CSS Viewport Units Explained: The Code Panda</figcaption></figure><p>In this text, I could be breaking down every of the six principal viewport gadgets and the 3 modifiers so that you can expectantly use viewport gadgets in all situations.</p><h3>Original Four Viewport Units</h3><p>The predominant CSS viewport devices are vw, vh, vmin, and vmax. Chances are you’ve got used to or visible those devices earlier so I will attempt to be as short as viable while explaining them.</p><h4>vw:</h4><p>vw stands for <strong><em>Viewport Width</em></strong> and represents a percent of the width of the viewport. The range located earlier than vw is the share of the width of the viewport this period will be.</p><p>For instance in case you wrote 10vw then this will constitute a period of 10% of the width of your viewport.</p><p>The viewport is simply an elaborate phrase for the scale of your screen, so in case you have been on a huge computing device with a width of 1920px, 10vw could constitute 192px.</p><p>If you have been alternatively on a cell smartphone with a width of 300px, then 10vw could best be 30px.</p><h4>vh:</h4><p>Vh stands for Viewport Height and is precisely identical to vw however for the peak rather than the width. These gadgets may be utilized in aggregate to without problems make detail fill the complete length of the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*sSjK_gwS81eeyj9IUeeBow.png" /></figure><h4>vmin and vmax:</h4><p>Vmin and vmax constitute the most and most minimal viewport measurement.</p><p>For instance, in case you had been on a cell smartphone, this is 300px extensive and 800px tall, vmin might constitute the width of the viewport, and vmax might constitute the peak of the device. These devices are absolutely beneficial in case you want length and detail primarily based totally on the smallest/biggest measurement of a display.</p><p>For instance, the subsequent CSS will create a rectangular this is as massive as feasible without overflowing in any path on account that it’s going to by no means be large than 100% of the smallest display measurement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/265/1*vQWidkdzpH_ud1BDi8x75g.png" /></figure><h3>Two New Viewport Units</h3><p>CSS has been seeking to pass far from a strict pinnacle/bottom, left/proper, peak/width version to an extra dynamic start/end, block/inline version. The most important cause for this modification is to make it less difficult to undertake extraordinary writing guidelines on your code.</p><p>If your whole software swaps from a horizontal writing route to a vertical writing route the concept of pinnacle/bottom, or width/peak doesn`t always imply the identical element due to the fact that in case you desired to feature padding above and beneath your textual content this will be represented as padding to the left and proper in a vertical writing machine as opposed to padding pinnacle and bottom. This is why CSS brought the <strong><em>vi</em></strong> and <strong><em>vb</em></strong> viewport units.</p><h4>vi:</h4><p>vi stands for <strong><em>Viewport Inline</em></strong> and represents the inline direction of your document. In a horizontal writing direction, this corresponds with the width of your viewport, while in a vertical writing direction this represents the height of your viewport.</p><p>The easy way to remember the direction of inline is to remember that it is the same direction that your text goes. Another way to remember this is if you have two inline elements (for example two spans) next to each other the direction they stack is your inline direction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*zT_52xxXjCUxUi2eyJf2-w.png" /></figure><h4>vb:</h4><p>vb stands for<strong><em> Viewport Block</em></strong> and represents the block route of your file. This is the other of vi so in a horizontal writing route this can correspond with the viewport top and in a vertical file, this can constitute the width of your viewport.</p><p>If you war to do not forget this unit simply do not forget that the block route will constantly be the route that block elements (as instance divs) will stack on a pinnacle of 1 another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*fcDiduXj3wKFVnRC6mN-hg.png" /></figure><h3>Viewport Unit Modifiers</h3><p>So ways we’ve blanketed the six predominant sorts of viewport devices, however, there are 3 wonderful modifiers that you may upload to the devices to cause them to behave otherwise while your viewport can alternate sizes.</p><p>For example, whilst you are on a cellular smartphone surfing the internet you could observe that the URL bar will disappear whilst you scroll down. When this takes place your viewport technically modifications length considering the fact that now the URL bar is now not taking on a part of your viewport. The modern CSS devices don’t have any manner to cope with this variation in viewport length that’s why those modifiers have been added.</p><p>These modifiers are <strong><em>s</em></strong>, <strong><em>l</em></strong>, and <strong><em>d</em></strong>. In order to apply a modifier, you simply want to area the modifier after the variety and earlier than the unit like <strong><em>10svw</em></strong>. This offers us four general mixtures for every of the 6 viewport units:</p><ol><li><strong><em>vw</em></strong></li><li><strong><em>svw</em></strong></li><li><strong><em>lvw</em></strong></li><li><strong><em>and dvw.</em></strong></li></ol><p>So some distance the entirety we’ve protected in this text has used no modifier that’s completely valid. When you operate no modifier at the unit, including 10vw or 10vh, the browser will routinely default to the usage of one of the three modifiers primarily based totally on browser implementation.</p><h4>S Modifier:</h4><p>The s modifier stands for Small and represents the smallest viable viewport. In our cell telecellsmartphone instances, this will be the length of the viewport while the URL bar is shown. If you put detail to 100svh it’d take in 100% of the peak of the display primarily based totally on the dimensions of the display while the URL bar is shown. It does now no longer count if the URL bar is seen or now no longer this unit will constantly base its length on what the viewport might be if the URL bar is showing.</p><h4>l Modifier:</h4><p>The l modifier stands for Large and represents the biggest feasible viewport. This is quite lots of the alternative of the s modifier. In our cellular telecellsmartphone instances, this will be the length of the viewport whilst the URL bar is NOT shown. If you put detail to 100lvh it’d soak up 100% of the peak of the display primarily based totally on the scale of the display whilst the URL bar is NOT shown. It does now no longer count if the URL bar is seen or now no longer this unit will constantly base its length off what the viewport might be if the URL bar is NOT displaying this means that in case you set the detail to <strong><em>100lvh</em></strong> and the URL bar is displaying it’s going to technically be large than the display.</p><h4>D Modifier</h4><p>The d modifier stands for Dynamic and represents the contemporary viewport length. This is sort of an aggregate of the s and l modifier. In our cell smartphone instance, this will usually be the dimensions of the contemporary viewport regardless of if the URL bar is displaying or not. If our URL bar is displaying then the d modifier is the equal length because of the s modifier, whilst if the URL bar is NOT displaying the d modifier is the equal length because of the l modifier.</p><p>During the transition between the URL bar being shown and hidden this unit will scale in size dynamically so it will always fill all available space. This is great if you need to guarantee an element is always sized based on the viewport but can be taxing since it will cause a lot of repaints as the size constantly changes.</p><h3>Conclusion</h3><p>While 24 gadgets might also additionally feels like lots it’s far surely simply six gadgets with 3 modifiers which are all surprisingly easy. These easy combinations, though, supply us with splendid energy in building the ideal CSS layout.</p><h3>About us:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*b5Mz5e4DLUxAGZE4.jpg" /></figure><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read <a href="https://thecodepanda.medium.com/25-algorithm-you-must-know-a-rubics-edition-9d1816f72720?source=user_profile---------0----------------------------"><strong><em>25 Algorithm You Must Know: A Rubics Edition</em></strong></a><strong><br></strong>Read: <a href="https://thecodepanda.medium.com/do-you-want-to-feel-data-structures-a-kinda-roadmap-c65c7b78510?source=user_profile---------5----------------------------"><strong><em>Do you want to feel Data Structures?: A Kinda Roadmap</em></strong></a><strong><br></strong>Read: <a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------0----------------------------"><strong><em>Searching &amp; Sorting</em></strong></a><strong><em><br></em></strong>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong><em>Let’s Draw a Roadmap for Competitive Coding</em></strong></a><strong><br></strong>Read <a href="https://thecodepanda.medium.com/time-space-game-lets-find-complexity-of-my-code-a1e53288a437?source=user_profile---------9----------------------------"><strong><em>Time &amp; Space Game: Let’s Find Complexity of My Code</em></strong></a></p><p>If you are a beginner, you can start your coding journey with us our <a href="https://thecodepanda.in/codelab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading this article this far. Please share your viewpoints in the comments and topics on which you want an article.<br><strong>Thank you. See you soon!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a44cc92e26a5" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/all-24-css-viewport-units-explained-a44cc92e26a5">All 24 CSS Viewport Units Explained</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[20+ Console Methods, I Bet You Can’t Even Name 10]]></title>
            <link>https://interviewnoodle.com/20-console-methods-i-bet-you-cant-even-name-10-fc95a7aa357d?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc95a7aa357d</guid>
            <category><![CDATA[browser-console]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[console-log]]></category>
            <category><![CDATA[console]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Tue, 19 Jul 2022 03:44:55 GMT</pubDate>
            <atom:updated>2022-07-20T05:29:43.990Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Coders, I am Rubics, and Today I am going to 20+ console Methods. I bet you can’t even know 10.</p><blockquote>Are they useful?</blockquote><p>Definity, not all are useful all the time but yeah knowing them increases your chance to solve web-based problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*nzzQLp1iWgFqYi_q7-zeNA.png" /></figure><p>You are possibly aware of the <strong>console.log</strong> technique and perhaps some different console strategies like the <strong>console.blunders </strong>and <strong>console.dir</strong>, however, there are truly over <strong>20 console strategies</strong> to be had with a purpose to use. Each of those strategies has its personal use instances and in case you use the proper technique for every use case you’ll substantially growth the pleasant of your debugging.</p><p>I determined to interrupt down this article into four awesome sections.<br><strong><em>1. Basic logging<br>2. Performance logging<br>3. Utility logging<br>4. Format logging</em></strong></p><p>Each of those sections covers a handful of techniques geared in the direction of the overarching goal. These sections additionally consist of heaps of widespread debugging hints and hints that you now no longer need to overlook.</p><h3><strong>Basic Logging Methods</strong></h3><p>To begin with we want to speak approximately the five primary logging techniques.<br><strong>1. log<br>2. debug<br>3. info<br>4. warn<br>5. error</strong></p><p>Each of those techniques paintings precisely the equal way. The best distinction is how they may be displayed in the console. <br>Let`s study an instance of the usage of every one of those techniques to evaluate their output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*1I1UFqoP092usX3K5NC-4A.jpeg" /><figcaption>Left: Google Chrome console<br>Right: Firefox console</figcaption></figure><p>If you do that out your self you can now no longer see a number of the logging messages. That is due to the fact you may show/disguise one-of-a-kind logging ranges inside the browser console. These are commonly configured above the console window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*PlXGxv4VrRLv9YFCOj1hSw.jpeg" /><figcaption>Top: Google Chrome console<br>Bottom: Firefox console</figcaption></figure><p>This cap’s potential to expose/conceal exclusive logging tiers is one of the motives for those numerous logging techniques being so useful. You can without difficulty configure what you need to expose so in case you are most effective in seeking out mistakes you may flip off all of the logging tiers that aren’t blunders which makes it simpler to digest what goes on.</p><h4><strong>Basic Syntax</strong></h4><p>Now the fundamental formula to using all these techniques is to print/use them one by one printing in a separate log function.<br>But If you need a couple of values, you can also pass them in a single console.log function by using comma separation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*Kn8UhdryNxJ3GSGvbPvDGA.jpeg" /></figure><p>This will work for any of the five fundamental logging techniques and is a superb manner to log associated values all at once rather than printing every logging in its own line.</p><h4><strong>Live View Issues</strong></h4><p>One factor that browsers do to try to assist with debugging is constantly displaying the stay updated value for any item logged to the console. In this manner in case you run the underneath code and study the console you could see distinct outputs relying on the console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*R6OC8mDYAKdPGlh8klIBKA.jpeg" /></figure><p>The above code will print in case your item now no longer have any nested objects/arrays. If you’ve got objects/arrays nested inner your item you may want to both write your very own technique to deeply clone the item or simply serialize to/from JSON.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*9DZitcJMUJFESojItrLSYw.jpeg" /></figure><h3><strong>Advanced String Logging</strong></h3><p>The ultimate element we want to cowl with those primary logging strategies earlier than transferring onto the greater particular strategies is a way to do <strong><em>superior styling</em></strong>. <br>Sometimes the primary styling of printing out strings/values isn’t always pretty sufficient and also you want satisfactory management over how the output is outlined on the screen. This may be performed in 2 principal ways. <br>First, you could use string formatting to layout how the content material is located and published inside a string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*UHq4-Xva9x8tcvaDBUU8Ig.jpeg" /></figure><p>In the above instance, we’re using <strong><em>%s, %d, %f, </em></strong>and <strong><em>%o</em></strong> as placeholders wherein values have to be inserted into the output of our console. When you operate those placeholders the following values handed to the log approach might be published wherein the placeholder values are. <br><strong><em>- %s is for string placeholders. <br>- %d is for integer placeholders. <br>- %f is for decimal placeholders. <br>- %o is for item placeholders. </em></strong><br>Now that is a quite cool feature, however, without a doubt, it isn’t something I use a lot because I can simply use tagged template literals instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*IX3bYg1HB6z_oKFSLeOhPQ.jpeg" /></figure><p>The <strong><em>2nd kind of formatting</em></strong> is a good deal greater beneficial and this is because it permits you to jot down custom CSS for styling your logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*lrPBeIyX2vDiQpvn4SVFsw.jpeg" /></figure><p>The <strong><em>%c </em></strong>image tells the log approach to use something CSS patterns are exceeded as the subsequent argument to the log approach to all of the textual content that comes after the %c. These patterns will observe all of the manners as much as the stop of log approach or till the subsequent %c image is used. This is ideal in case you need to have a truly fancy console message for unique use cases.</p><h3><strong>Format Logging Methods</strong></h3><p>Now that we’re ultimately carried out speaking approximately the simple logging strategies we are able to speak approximately a few greater superior logging strategies beginning with a few simple log strategies that alternate how the output is formatted.</p><h4><strong>Dir</strong></h4><p>The dir approach may be very straight-ahead in that it really works almost identically to the log approach, however with <em>one exception</em>. The log approach will output HTML factors as HTML which may be traversed at the same time as dir will log the whole lot as though it had been JSON. This method that HTML factors might be logged much like an item while the use of dir which makes it extraordinarily beneficial for viewing residences on an HTML element.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*9w91Y_XAdU-39viXOeuABA.jpeg" /><figcaption>Left: console.log(document.body)<br>Right: console.dir(document.body)</figcaption></figure><h4><strong>Table</strong></h4><p>The table approach is beneficial for showing an array of gadgets in a tabular layout which makes it less complicated to experiment with small datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*FlBTJ9LpFrJN1VF9VkOViw.jpeg" /></figure><p>This makes scanning your listing to look for variations among factors withinside the array easier. You also can type through particular columns withinside the desk by simply clicking at the header of the desk if that function is supported for your browser dev tools.</p><p><strong>Grouping</strong><br>The very last manner to layout console output is with the three institution strategies. <br><strong><em>1. group<br>2. groupcollapsed<br>3. groupEnd</em></strong></p><p>The names of those strategies are quite self-explanatory and <strong>groupCollapsed</strong> strategies each begin a collection with the simplest distinction being that the groupCollapsed technique defaults to having the institution closed withinside the console even as the institution defaults to having the institution open. The <strong>groupEnd</strong> technique then closes off the modern institution. <br>Every log that happens at the beginning and stopping of a collection may be placed inner that institution. Let`s study an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*IKRMRSpTEM-hbg5FmnAqrA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*eiur5iLgfEspElh4gqm0BA.jpeg" /></figure><p>In the above instance, we created three distinct corporations. The first organization had no cost that exceeded the organization approach so it simply receives a default label. <br>In the 2d organization, we exceeded a label of Label to the organization approach so withinside the output you may see that it has that label related to the organization. We additionally placed a collapsed organization interior of this organization to exhibit that you may nest corporations interior of corporations as plenty as you need. You also can see that the collapsed organization isn’t open with the aid of using default withinside the output. <br>These organization techniques are notable in case you want to output a big quantity of records this is related, however you don`t need it to fill the whole output of the console.</p><h3><strong>Performance Logging Methods</strong></h3><p>The subsequent institution of console strategies I need to speak approximately is the overall performance-centered strategies. These may be cut up into groups. <br><strong><em>1. Timing Related<br>2. Profiler Related</em></strong></p><h4><strong>Time-Based Logging</strong></h4><p>The first institution is the handiest to apprehend considering all it offers is calculating the time among feature calls. It additionally works very in addition to grouping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*LOvN6i3bwN3gjKdO7QHsUg.jpeg" /></figure><p>We begin a timer much like we begin a group. We can skip a label if we need it so that it will companion our timer with that label. The best distinction between timers and companies is that in case you supply your timer a label you want to additionally use the equal label whilst you finish the timer. This is due to the fact you may run a couple of extraordinary timers without delay and the label is used to decide which timer to stop. <br>Timers even has a neat feature known as a<strong> time log </strong>which helps you to print out the modern time of the timer without finishing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*OCOdwdPPWsCDDu-zuwIsIQ.jpeg" /></figure><p>Again similar to with<strong><em> timeEnd</em></strong> you want to skip the label to the time log so it is aware of what timer to use.</p><h4><strong>Profiler Logging</strong></h4><p>Now in case you need to take your overall performance logging to the following stage, you could use profiler logging which fits much like the time primarily based totally logging from above, however in preference to the usage of a <strong>starting/preventing</strong> an easy timer it <strong>starts/stops </strong>the profiler constructed into the dev equipment of your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*ifEujaoTmZNpWS-9Wh8DyA.jpeg" /></figure><p>This will release the profiler for your browser dev gear and report a group of overall performance-associated facts. Now relying on your browser this fact is positioned in a one-of-a-kind region and displayed in a one-of-a-kind way. Also, that is a non-fashionable characteristic so a few browsers might not assist this or may also deal with it in an atypical way. Because of this I typically wouldn`t advocate the use of this technique until you know the way it really works together along with your browser. <br>Lastly, earlier than we flow on I ought to point out that much like with time primarily based totally logging you may use the timeStamp technique to feature a marker for your profiler so that you can see how long it took to get to that point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*k2BDI11Y5Orq6Tgmjgv6eg.jpeg" /></figure><h3><strong>Utility Logging Methods</strong></h3><p>The very last console techniques I need to speak approximately don`t honestly match into any of the above categories, however, they’re nevertheless exceptionally useful.</p><h4><strong>Assert</strong></h4><p>Probably my preferred console approach of this organization asserts. This works precisely similar to the fundamental console methods, however, it takes a boolean because of the first parameter. If this boolean is real it’s going to now no longer do something and basically pass the log entirely. If the boolean is fake then it’s going to log the entirety exceeded to the assert approach after the boolean parameter. It is largely like wrapping your log internal and if statement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*nIgcQmghg5n8JEp8ceVnBA.jpeg" /></figure><p>This method is perfect for testing values to see if they are what you expect which can make your logs much cleaner if you only log when something is unexpected.</p><h4><strong>Clear</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*uy__ysYjf0EClL7WSINICA.jpeg" /></figure><h4><strong>Count and countReset</strong></h4><p>The depend and countReset capabilities make it clean to depend on the variety of instances the fee became logged. This works incredibly further to timers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*PYJCnJSL-ZB1ZYk-SoSr6A.jpeg" /></figure><p>The count feature takes an elective label to indicate what you’re counting after which in case you need to reset the count you need to byskip the equal label to the reset feature.</p><h4><strong>Trace</strong></h4><p>The closing console approach I need to speak approximately is trace. This is a completely easy feature that simply prints out the present-day stack trace on the factor the approach is called. This is awesome for debugging what capabilities are calling different capabilities and to parent out how you bought to a particular area withinside the code.</p><h3><strong>Conclusion</strong></h3><p>I guess you didn`t anticipate there to be this many console strategies. I understand I changed into quite amazed with the aid of using the sheer amount of particular strategies once I commenced my studies for this article. Hopefully, at the least, this kind of new strategy will assist take your debugging talents to the following level.</p><h3>About us:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*4BPpvNtkXnmGeEQ8.jpg" /></figure><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read <a href="https://thecodepanda.medium.com/25-algorithm-you-must-know-a-rubics-edition-9d1816f72720?source=user_profile---------0----------------------------"><strong><em>25 Algorithm You Must Know: A Rubics Edition</em></strong></a><strong><br></strong>Read: <a href="https://thecodepanda.medium.com/do-you-want-to-feel-data-structures-a-kinda-roadmap-c65c7b78510?source=user_profile---------5----------------------------"><strong><em>Do you want to feel Data Structures?: A Kinda Roadmap</em></strong></a><strong><br></strong>Read: <a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------0----------------------------"><strong><em>Searching &amp; Sorting</em></strong></a><strong><em><br></em></strong>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong><em>Let’s Draw a Roadmap for Competitive Coding</em></strong></a><strong><br></strong>Read <a href="https://thecodepanda.medium.com/time-space-game-lets-find-complexity-of-my-code-a1e53288a437?source=user_profile---------9----------------------------"><strong><em>Time &amp; Space Game: Let’s Find Complexity of My Code</em></strong></a></p><p>If you are a beginner, you can start your coding journey with us our <a href="https://thecodepanda.in/codelab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading this article this far. Please share your viewpoints in the comments and topics on which you want an article.<br><strong>Thank you. See you soon!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc95a7aa357d" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/20-console-methods-i-bet-you-cant-even-name-10-fc95a7aa357d">20+ Console Methods, I Bet You Can’t Even Name 10</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 5 algorithmic Approaches You should Know: The Code Panda]]></title>
            <link>https://interviewnoodle.com/top-5-algorithmic-approaches-you-should-know-the-code-panda-aa6de57a1ba6?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa6de57a1ba6</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[competitive-programming]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Tue, 21 Jun 2022 06:26:17 GMT</pubDate>
            <atom:updated>2022-06-21T10:27:54.844Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello friends, I am back…Mr. Guy is back after a long vacation. Honestly, I love vacations and hate working. When I came back, Domino gave me another task.</p><blockquote><strong>I hate working Man….I hate you Domino…</strong></blockquote><p>But Somehow, I prepared the top 5 algorithmic approaches I am sure you heard them before.</p><blockquote>See Domino…they knew it…they already know them. I hate you…you ruined my vacations.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*VLAGUbL3jtiFGkXiDLxvsg.gif" /><figcaption>Top 5 algorithmic Approaches You should Know: The Code Panda</figcaption></figure><p>First List out all the algorithmic approaches but we are going to discuss only the top 5 in this article:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*_5Oo41m36Iuu7UAUVgvXAg.png" /></figure><ol><li><strong>Simple recursive algorithms</strong></li><li><strong>Backtracking algorithms</strong></li><li><strong>Divide and conquer algorithms</strong></li><li><strong>Dynamic programming algorithms</strong></li><li><strong>Greedy algorithms</strong></li><li><strong>Branch and bound algorithms</strong></li><li><strong>Brute force algorithms</strong></li><li><strong>Randomized algorithms</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*ZvWDA8oIR9hpykRlnMfeSg.png" /></figure><h3>Brute Force algorithm:</h3><p>The brute force algorithm sounds exactly like that. It’s not an advanced way to improve efficiency, it’s an easy way to test all possibilities by relying on pure computing power. A brute force solution<strong><em> calculates the total distance for each possible route and then chooses the shortest route</em></strong>. This is not particularly efficient, as clever algorithms can eliminate many possible routes. The brute force time complexity is <strong>O (mn)</strong> and is sometimes referred to as <strong>O (n * m).</strong> Therefore, a brute force search for a sequence of “n” characters within a sequence of “m” characters requires n * m trials.</p><p>Some of the popular algorithms that come under brute force algos are:-</p><ol><li><a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------4----------------------------"><strong>Sorting algorithms</strong></a></li><li><a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------4----------------------------"><strong>Search algorithms</strong></a></li><li><a href="https://en.wikipedia.org/wiki/Data_compression"><strong>Compression algorithms</strong></a></li></ol><h3>Greedy algorithm:</h3><p>A greedy algorithm is an approach to solving a problem by choosing the <strong>best option currently available</strong>. Don’t worry if the current best results will give you the best overall results. The algorithm does not undo the previous decision if the selection is incorrect. It works with a <strong>top-down approach.</strong> The greedy algorithm has some advantages over other algorithms as it was easy to understand but it has some drawbacks also as it doesn’t always produce the optimized code.</p><p>Some of the popular algorithms that follow the greedy approach are:-</p><ol><li><a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------4----------------------------"><strong>Selection Sort</strong></a></li><li><a href="https://en.wikipedia.org/wiki/Knapsack_problem"><strong>Knapsack Problem</strong></a></li><li><a href="https://en.wikipedia.org/wiki/Minimum_spanning_tree"><strong>Minimum Spanning Tree</strong></a></li><li><a href="https://en.wikipedia.org/wiki/Shortest_path_problem#:~:text=The%20single%2Dsource%20shortest%20path,a%20single%20destination%20vertex%20v."><strong>Single-Source Shortest Path Problem</strong></a></li><li><a href="https://en.wikipedia.org/wiki/Optimal_job_scheduling"><strong>Job Scheduling Problem</strong></a></li><li><a href="https://en.wikipedia.org/wiki/Prim%27s_algorithm"><strong>Prim’s Minimal Spanning Tree Algorithm</strong></a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*pupoeRKjHrVZZyE3bmPyeg.png" /></figure><h3>Recursive algorithm:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*2zYToQSj10aQiPcYFV8LhQ.png" /></figure><p>The recursive algorithm calls itself with the small input value and returns the result of the current input by performing basic math operations on the small input’s return value. <br>In general, if you can solve a problem by applying the solution to a smaller version of the same problem and reducing the smaller version to one that can be easily solved, you can use a recursive algorithm to solve the problem. <br>A recursive algorithm is an algorithm that <strong>gets the result of the current input by calling itself with a “smaller (or simpler)” input value</strong> and performing a simple operation on the return value. For small-large (or simple) inputs.</p><p>Different types of recursion are:-</p><ol><li><strong>Direct Recursion</strong></li><li><strong>Indirect Recursion</strong></li><li><strong>Tailed Recursion</strong></li><li><strong>Non-Tailed Recursion</strong></li></ol><h3>Backtracking algorithm:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*MUrhH-97cr--z9Nv-dXTOQ.jpeg" /></figure><p>Backtracking is an algorithmic technique that aims to use the <strong>brute force</strong> method to obtain all the solutions to a problem. This includes the step-by-step construction of a set of all solutions.</p><p>Due to the limitations of the issues, solutions that do not meet them will be removed. Use the <strong>recursive call to search</strong> for a set of solutions, <strong>build the solution in stages</strong> and <strong>increase it</strong> over time. <br><strong>A search tree</strong> called a state-space tree is used to find these solutions. In the state-space tree, each branch is a variable and each level represents a solution.</p><p>Backtracking algorithm with <strong>depth-first search</strong>, When you start searching for a solution, the restriction function is applied and you can see if the solution the algorithm has created so far meets the constraints. In that case, the search will continue. Otherwise, the branch will be dropped and the algorithm will revert to the previous level.<br>The advantage of this algorithm is that it produced a very efficient and easy-to-understand code.</p><h3>Divide and conquer:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b18uEVlfbKFHsOvV.png" /></figure><p>The divide-and-conquer algorithm is a strategy for solving large problems by <strong>dividing the problem into smaller sub-problems</strong>. Solve the sub-problem, Combine them to get the output you want. <br>We Use <strong>recursion</strong> to use the divide-and-conquer algorithm(we had discussed this above ). We can calculate the time complexity of this algorithm by using the master theorem.</p><p>Divide and Conquer Applications</p><ol><li><a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------4----------------------------"><strong>Binary Search</strong></a></li><li><a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------4----------------------------"><strong>Merge Sort</strong></a></li><li><a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------4----------------------------"><strong>Quick Sort</strong></a></li><li><a href="https://en.wikipedia.org/wiki/Strassen_algorithm"><strong>Strassen’s Matrix multiplication</strong></a></li><li><a href="https://en.wikipedia.org/wiki/Karatsuba_algorithm"><strong>Karatsuba Algorithm</strong></a></li></ol><blockquote><strong>Domino….I completed It…I did it… Can I go back to my vacation again?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*cnE2_6Mq4UB9Xt6YN9C1ag.png" /></figure><h3>About us:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*gEghDdBLQB4__wCL.jpg" /></figure><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read: <a href="https://thecodepanda.medium.com/25-algorithm-you-must-know-a-rubics-edition-9d1816f72720?source=user_profile---------0----------------------------"><strong><em>25 Algorithm You Must Know: A Rubics Edition</em></strong></a><strong><br></strong>Read: <a href="https://thecodepanda.medium.com/do-you-want-to-feel-data-structures-a-kinda-roadmap-c65c7b78510?source=user_profile---------5----------------------------"><strong><em>Do you want to feel Data Structures?: A Kinda Roadmap</em></strong></a><strong><br></strong>Read: <a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------0----------------------------"><strong><em>Searching &amp; Sorting</em></strong></a><strong><em><br></em></strong>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong><em>Let’s Draw a Roadmap for Competitive Coding</em></strong></a><strong><br></strong>Read: <a href="https://thecodepanda.medium.com/time-space-game-lets-find-complexity-of-my-code-a1e53288a437?source=user_profile---------9----------------------------"><strong><em>Time &amp; Space Game: Let’s Find Complexity of My Code</em></strong></a></p><p>If you are a beginner, you can start your coding journey with us our <a href="https://thecodepanda.in/codelab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading, Please meet me in the comments for queries, suggestions, or appreciation and Please don’t mind my language. I didn’t get any coffee till now.</p><p>See You after my vacation!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa6de57a1ba6" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/top-5-algorithmic-approaches-you-should-know-the-code-panda-aa6de57a1ba6">Top 5 algorithmic Approaches You should Know: The Code Panda</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[25 Algorithm You Must Know: A Rubics Edition]]></title>
            <link>https://interviewnoodle.com/25-algorithm-you-must-know-a-rubics-edition-9d1816f72720?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d1816f72720</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[competitive-programming]]></category>
            <category><![CDATA[competitive-coding]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Mon, 13 Jun 2022 05:12:27 GMT</pubDate>
            <atom:updated>2022-06-14T07:31:55.072Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey guys, Rubics this side. I see you love my first blog <a href="https://medium.com/interviewnoodle/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong><em>Let’s Draw A Roadmap for Competitive Coding</em></strong></a><strong><em>. </em></strong>It was perfect. After that, I also wrote about <a href="https://medium.com/interviewnoodle/time-space-game-lets-find-complexity-of-my-code-a1e53288a437"><strong><em>Time &amp; Space Complexity</em></strong></a>, you guys, love these too much, so I decided to write something good for you. <br>I have been searching the algorithm’s list for the past month and here are the top 25 algorithms you must know for doing <strong>competitive coding</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*MDzmxKGIZ4SdeKgAhuEvpw.png" /><figcaption>25 Algorithms you must know by thecodepanda</figcaption></figure><p>Today, We will explore the top <strong><em>25 fundamental algorithms</em></strong> that every programmer should have to learn during their Data structure and algorithm learning path.</p><p>It improves the quality of code and using them makes your job simpler. Sometimes it will decrease the time and space complexity of your code.</p><p>First, let me list out every algorithm for you, then I will write a few lines about them one by one:-</p><ol><li><strong>Merge Sort Algorithm</strong></li><li><strong>Quicksort Algorithm</strong></li><li><strong>Topological Sort Algorithm</strong></li><li><strong>Insertion Sort Algorithm</strong></li><li><strong>Counting Sort Algorithm</strong></li><li><strong>Fill Algorithm Sort Algorithm</strong></li><li><strong>Heap Sort Algorithm</strong></li><li><strong>Binary Search Algorithm</strong></li><li><strong>Breadth-First Search (BFS) Algorithm</strong></li><li><strong>Depth First Search (DFS) Algorithm</strong></li><li><strong>Kruskal’s Algorithm</strong></li><li><strong>Floyd Warshall Algorithm</strong></li><li><strong>Dijkstra’s Algorithm</strong></li><li><strong>Bellman-Ford Algorithm</strong></li><li><strong>Kadane’s Algorithm</strong></li><li><strong>Lee Algorithm</strong></li><li><strong>Fill Algorithm</strong></li><li><strong>Floyd’s Cycle Detection Algorithm</strong></li><li><strong>Union Find Algorithm</strong></li><li><strong>KMP Algorithm</strong></li><li><strong>Kahn’s Topological Sort Algorithm</strong></li><li><strong>Huffman Coding Compression Algorithm</strong></li><li><strong>Quickselect Algorithm</strong></li><li><strong>Boyer-Moore Majority Vote Algorithm</strong></li><li><strong>Euclid’s Algorithm</strong></li></ol><p>Huge list, Right? Let’s see them one by one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*CMfOm_QAJrzh9Zzu.jpg" /></figure><h4>→ <a href="https://en.wikipedia.org/wiki/Merge_sort">Merge Sort Algorithm</a></h4><p>it uses the divide and conquer approach to sort the elements. It is one of the most popular and efficient sorting algorithms.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Quicksort">Quicksort Algorithm</a></h4><p>Quicksort picks an element as a pivot, and then it partitions the given array around the picked pivot element. In quick sort, a large array is divided into two arrays in which one holds values that are smaller than the specified value (Pivot), and another array holds the values that are greater than the pivot.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Insertion_sort">Insertion Sort Algorithm</a></h4><p>Insertion sort is a simple sorting algorithm that works similar to the way you sort playing cards in your hands. The array is virtually split into a sorted and an unsorted part. Values from the unsorted part are picked and placed at the correct position in the sorted part.</p><h4>→<a href="https://en.wikipedia.org/wiki/Counting_sort">Counting Sort Algorithm</a></h4><p>Counting sort is a sorting technique based on keys between a specific range. It works by counting the number of objects having distinct key values (kind of hashing). Then do some arithmetic to calculate the position of each object in the output sequence.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Heapsort">Heap Sort Algorithm</a></h4><p>Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the minimum element and place the minimum element at the beginning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*xqgRKdGVfEiv9mW_jFDLUQ.png" /></figure><h4>→ <a href="https://en.wikipedia.org/wiki/Topological_sorting">Kahn’s Topological Sort Algorithm</a></h4><p>Kahn’s topological sort algorithm works by finding vertices with no incoming edges and removing all outgoing edges from these vertices.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Binary_search_tree">Binary Search Algorithm</a></h4><p>Binary search is the search technique that works efficiently on sorted lists. Hence, to search an element into some list using the binary search technique, we must ensure that the list is sorted.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Breadth-first_search">Breadth-First Search (BFS) Algorithm</a></h4><p>Breadth-first search is a graph traversal algorithm that starts traversing the graph from the root node and explores all the neighboring nodes. Then, it selects the nearest node and explores all the unexplored nodes. While using BFS for traversal, any node in the graph can be considered as the root node.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Depth-first_search">Depth First Search (DFS) Algorithm</a></h4><p>The depth-first search (DFS) algorithm starts with the initial node of graph G and goes deeper until we find the goal node or the node with no children.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Kruskal%27s_algorithm">Kruskal’s Algorithm</a></h4><p>Kruskal’s Algorithm is used to find the minimum spanning tree for a connected weighted graph.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm">Floyd Warshall Algorithm</a></h4><p>Floyd-Warshall Algorithm is an algorithm for finding the shortest path between all the pairs of vertices in a weighted graph. This algorithm works for both the directed and undirected weighted graphs. But, it does not work for the graphs with negative cycles (where the sum of the edges in a cycle is negative).</p><h4>→ <a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm">Dijkstra’s Algorithm</a></h4><p>Dijkstra’s algorithm is very similar to Prim’s algorithm for minimum spanning trees. Like Prim’s MST, we generate an SPT (shortest path tree) with a given source as a root. We maintain two sets, one set contains vertices included in the shortest-path tree, other set includes vertices not yet included in the shortest-path tree. At every step of the algorithm, we find a vertex that is in the other set (set not yet included) and has a minimum distance from the source.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm">Bellman-Ford Algorithm</a></h4><p>The bellman-Ford algorithm helps us find the shortest path from a vertex to all other vertices of a weighted graph.<br>It is similar to Dijkstra’s algorithm but it can work with graphs in which edges can have negative weights.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Maximum_subarray_problem">Kadane’s Algorithm</a></h4><p>Kadane’s Algorithm can be viewed both as greedy and DP. As we can see that we are keeping a running sum of integers and when it becomes less than 0, we reset it to 0 (Greedy Part). This is because continuing with a negative sum is way worse than restarting with a new range.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Lee_algorithm">Lee Algorithm</a></h4><p>The Lee algorithm is one possible solution for maze routing problems based on a breadth-first search. It always gives an optimal solution, if one exists, but is slow and requires considerable memory.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Flood_fill">Fill Algorithm</a></h4><p>Infilthe ll algorithm, we start from a specified interior point (x, y) and reassign all pixel values that are currently set to a given interior color with the desired color.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Cycle_detection">Floyd’s Cycle Detection Algorithm</a></h4><p>Floyd’s cycle finding algorithm or Hare-Tortoise algorithm is a pointer algorithm that uses only two pointers, moving through the sequence at different speeds. This algorithm is used to find a loop in a linked list.</p><h4>→ <a href="https://fr.wikipedia.org/wiki/Union-find">Union Find Algorithm</a></h4><p>A union-find algorithm is an algorithm that performs two useful operations on such a data structure:<br>Find: Determine which subset a particular element is in.<br>Union: Join two subsets into a single subset.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Topological_sorting">Topological Sort Algorithm</a></h4><p>The topological sort algorithm takes a directed graph and returns an array of the nodes where each node appears before all the nodes it points to.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm">KMP Algorithm</a></h4><p>Knuth-Morris and Pratt introduce a linear time algorithm for the string matching problem. A matching time of O (n) is achieved by avoiding comparison with an element of ‘S’ that have previously been involved in comparison with some element of the pattern ‘p’ to be matched. i.e., backtracking on the string ‘S’ never occurs</p><h4>→ <a href="https://en.wikipedia.org/wiki/Huffman_coding">Huffman Coding Compression Algorithm</a></h4><p>Huffman coding is a lossless data compression algorithm. In this algorithm, a variable-length code is assigned to input different characters.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Quickselect">Quickselect Algorithm</a></h4><p>Quickselect is a selection algorithm to find the k’th smallest element in an unordered list. It is closely related to the Quicksort sorting algorithm.</p><h4>→ <a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_majority_vote_algorithm">Boyer-Moore Majority Vote Algorithm</a></h4><p>The Boyer-Moore voting algorithm is one of the popular optimal algorithms which is used to find the majority element among the given elements that have more than N/ 2 occurrences. This works perfectly fine for finding the majority element which takes 2 traversals over the given elements, which works in O(N) time complexity and O(1) space complexity.</p><h4>→<a href="https://en.wikipedia.org/wiki/Euclidean_algorithm">Euclid’s Algorithm</a></h4><p>the Euclidean algorithm,[note 1] or Euclid’s algorithm, is an efficient method for computing the greatest common divisor (GCD) of two integers (numbers), the largest number that divides them both without a remainder.</p><h3>About us:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*Deu7Y8cHvnn4rHsb.jpg" /></figure><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read: <a href="https://thecodepanda.medium.com/want-to-get-started-with-data-structure-5756f5b85c8f"><strong><em>Want to get started with Data Structure</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/panda-team-on-mission-tree-a-data-structure-dcc760d0ab42?source=user_profile---------0----------------------------"><strong><em>Learn About Trees</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------0----------------------------"><strong><em>Searching &amp; Sorting</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong>Let’s Draw a Roadmap for Competitive Coding</strong></a></p><p>If you are a beginner, you can start testing your coding skill in our <a href="https://thecodepanda.in/codelab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading, Please support in comments for queries, suggestions, or appreciation.</p><p>See You Soon!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d1816f72720" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/25-algorithm-you-must-know-a-rubics-edition-9d1816f72720">25 Algorithm You Must Know: A Rubics Edition</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[6 Mistakes React Developer Make: Avoid It]]></title>
            <link>https://interviewnoodle.com/6-mistakes-react-developer-make-avoid-it-1032bdd15d79?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1032bdd15d79</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[website-design]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Mon, 06 Jun 2022 06:40:26 GMT</pubDate>
            <atom:updated>2022-06-11T13:06:49.453Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey Coders, Pico this side. I am studying React Nowadays. Yup, Somehow gain interest in Frontend Development. So When I was learning, I asked Rubics to let me know the common mistake a react developer makes in starting, so I can avoid it.</p><p>Here are what Rubics told me and I prepare a note to share with you:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*0Oaphcw6n_VaNiy6qLB7xA.png" /><figcaption>6 Mistakes React Developer should avoid by The Code Panda</figcaption></figure><p>Nowadays a lot of companies are hiring developers that can develop applications that are single-page applications. <br>So here the question arises <strong><em>what is a single-page application?</em></strong> <br>Single page application is the type of website that load once and all the task after that are performed by the user are done with the help of Javascript like youtube, Facebook, etc. <br>Some of the most popular frameworks to do so are React, Angular, Vue, etc.</p><h3>What Is React Framework?</h3><p>React is a <strong>free</strong> and <strong>open-source</strong> front-end JavaScript library for building user interfaces based on UI components. It was developed and maintained by <strong><em>Meta or Facebook</em></strong>. <br>With the help of React, we can make reusable components.</p><p><strong>So what do components mean?<br></strong>Let us discuss a situation in which you are going to make a website that contains different sections like<strong><em> Header, Footer, Testimonials</em></strong>, etc. If we make this type of website with the help of React we have to divide the whole website into different components like footer component, header component, etc. You can think like components are just like <strong>functions</strong> in different programming languages.<br>React Use <strong><em>JSX instead of HTML</em></strong> and with the help of <strong><em>react-router,</em></strong> we can render all these components together fast and without reloading.</p><h4>Let’s explore the top 6 mistakes React developers make while creating React App:</h4><ol><li><strong><em>Not creating enough components:- </em></strong>With React, you’re able to create large components, but it’s better to keep components small, It Not only saves you time, but it also helps you find bugs in code as you can perform unit testing on each component.<br>let’s take a look at an example of the TodoList component:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*T5HU2pAG766yCU7Wj5_uPw.jpeg" /><figcaption>Example 1</figcaption></figure><p><strong><em>2. Modifying the state directly:- </em></strong>In React, the state should be immutable. The state object is where you store property values that belong to the component. When the state object changes, the component re-renders. <br>If you modify the state directly, it’ll cause performance issues that are difficult to fix. To fix this, you can either use the setState () method or the useState() hook.</p><p><strong><em>Note:</em></strong> You could also use map() and spread syntax to avoid mutating other state values.</p><p>Let’s look at an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*CND0d4_U3isiEUtU8pxwFA.png" /><figcaption>Example 2</figcaption></figure><p><strong><em>3. Creating God components:- </em></strong>God components are <strong>monolithic</strong> and not <strong>reusable</strong>. As the main purpose of using React type framework is to a reusable build component. You should instead separate the interconnected parts of your app and build them into their components. When you separate components this way, all parts of your app are easier to maintain and restructure when needed.</p><p>Let’s look at an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*l4rAm8_FNDqi17dx9dnkow.png" /><figcaption>Example 3</figcaption></figure><p><strong><em>4. Not using the key on a listing component:- </em></strong>Let’s say you need to render a list of items and your code looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*0QcQmTRNESEftgAz8nq9SA.png" /><figcaption>Example 4</figcaption></figure><p>When working with large lists, React tracks all of the list elements on the Document Object Model (DOM). React wouldn’t know what has changed in your list without this record.<br>To fix this, you need to add keys to all of your list elements. Keys give each element a unique identity, which helps React determine which items have been added, removed, modified, etc.<br>Here’s how to do this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*20NhIzuSohtkWsCbZbKZzQ.png" /><figcaption>Example 4.2</figcaption></figure><p><strong><em>5. Not following the ReactJS folder structure:- </em></strong>The folder structure is very important when considering future possibilities for a project. When navigating into any existing projects, it’s useful to have separate places for containers, assets, and components.</p><p><strong><em>6. Forgetting to start a component name with a capital letter:- </em></strong>In JSX, a component that begins with a lowercase letter compiles down to an HTML element. That generates an error while compiling.<br>Let’s say you wrote something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*QTnWPoiz824LdILMtqk1sQ.png" /><figcaption>Example 6</figcaption></figure><p>This starts throwing an error on the server as the class name should start with Capital Letters. It is simple to solve as start writing the class name in Upper case just like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*pPuS3kDIauifxHWJNFHLSw.png" /><figcaption>Example 6.2</figcaption></figure><h3>About us:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*Rbdw6TEsLuqlKek-.jpg" /></figure><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read: <a href="https://thecodepanda.medium.com/want-to-get-started-with-data-structure-5756f5b85c8f"><strong><em>Want to get started with Data Structure</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/panda-team-on-mission-tree-a-data-structure-dcc760d0ab42?source=user_profile---------0----------------------------"><strong><em>Learn About Trees</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------0----------------------------"><strong><em>Searching &amp; Sorting</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong>Let’s Draw a Roadmap for Competitive Coding</strong></a></p><p>If you are a beginner, you can start testing your coding skill in our <a href="https://thecodepanda.in/codelab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading, Please support in comments for queries, suggestions, or appreciation.</p><p>See You Soon!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1032bdd15d79" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/6-mistakes-react-developer-make-avoid-it-1032bdd15d79">6 Mistakes React Developer Make: Avoid It</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Array: A Well Known Data Structure]]></title>
            <link>https://interviewnoodle.com/array-a-well-known-data-structure-bd80f9616087?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd80f9616087</guid>
            <category><![CDATA[array-methods]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[arrays]]></category>
            <category><![CDATA[array-functions]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Wed, 27 Apr 2022 08:17:39 GMT</pubDate>
            <atom:updated>2022-04-27T13:30:55.589Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Coder, Rubics this side. Today I decided to give you a dig-down analysis of everyone&#39;s favorite Data Structure “<strong><em>Array</em></strong>”. We go through some basic and Important questions/topics which are important for cracking any interview.</p><blockquote>Rubics, is it worth it to read this blog?</blockquote><p>Yes, Usually people know about Array, and its operations but only a few people know Why we need an array, and most important What are the issues with Array that force us to look into other Data structures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OnmaqcoUjeHlMxQbNLyBAw.png" /><figcaption>Array: The Code Panda</figcaption></figure><p>Let’s start with the definition:</p><h3>What is Array?</h3><blockquote>Ohh…come on Rubics! Not again, you told us so many times.</blockquote><p>Yup, But let’s see again:</p><p><strong><em>An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together.</em></strong></p><p>Now Let’s see some important points:</p><ul><li>The array is the simplest, <strong><em>linea</em></strong>r data structure.</li><li>An array is a collection of items stored at <strong>contiguous memory locations</strong>. The idea is to store multiple items of the same type together.</li><li>It is easier to calculate the location of each element by simply adding an offset to a base value, i.e., the memory location of the first element of the array.</li><li>The location of the next index mainly depends on the data type of array. As each item takes its own space and the next space is allocated after it.</li><li>Arrays can be declared in various ways in different languages. For illustration, let’s take the C array declaration.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*4RYb2lD-qHpvHvRCs_s0hA.jpeg" /></figure><p>As per the above illustration, the following are the important points to be considered.<br>1. Index starts with 0.<br>2. Array length is 10 which means it can store 10 elements.<br>3. Each element can be accessed via its index. Forex, we can fetch an element at index 6 as 27.</p><h3>Why do we need an Array?</h3><p>The array is used to make things easy. Suppose you have to store all student&#39;s marks by the role number or a list of items. In a normal case, we have to care about a number of variables then we have to manage them.</p><p>That’s why we choose Array to make our job easy.</p><blockquote>Ohk Rubics, then Why do we need other data structure, they also use to store a lot of continue data into single variable.</blockquote><p>Yes, there are other data structures that store the same as an array but it&#39;s not always about storing the data but also caring about operations on data.</p><h3>Operations On Array:</h3><p>There are mainly 4 types of operations that we need to perform:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*vHTmJxFMlesrq-bQ.png" /></figure><ol><li>Traverse</li><li>Insertion</li><li>Deletion</li><li>Searching &amp; sorting</li></ol><h4>Traversal of Array:</h4><ul><li>The method of processing each element in the array exactly once is known as Traversal. In an array, Traversal starts from the first element in the array and ends at the last element of the array.</li><li>Traversing an array means accessing every element of the array for a specific purpose. For example: printing every element, counting the total number of elements, or performing any process on these elements.</li><li>Since, the array is a linear data structure (because all its elements form a sequence), traversing its elements is straightforward.</li></ul><h4>Insertion:</h4><ul><li>As the name suggests, insert data in an array but it is not as easy as it looks.</li><li>Inserting in the last of the array needs to traverse the whole array if the length is unknown. and in the case of static memory, there is the limitation of upper bound which we need to care about.</li><li>Inserting an item at starting or mid of the array needs to swift all values which makes this job tough.</li></ul><h4>Deletion:</h4><ul><li>As the insertion, deleting data in an array is not as easy as it looks.</li><li>Deleting from the last of the array needs to traverse the whole array if the length is unknown.</li><li>Deleting an item from starting or mid of the array needs to swift all values which make this job tough.</li></ul><h4>Searching in Array:</h4><ul><li>Not even a single day pass, when we do not have to search for something in our day-to-day life, car keys, books, pen, mobile charger, and whatnot. The same is the life of a computer, there is so much data stored in it, that whenever a user asks for some data, the computer has to search its memory to look for the data and make it available to the user. And the computer has its techniques to search through its memory fast, which you can learn more about in Operating System.</li><li>What if you have to write a program to search a given number in an array? How will you do it?</li><li>Well, to search for an element in a given array, there are two popular algorithms available:<br><a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------1----------------------------"><strong><em>1. Linear Search</em></strong></a><br><a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------1----------------------------"><strong><em>2. Binary Search</em></strong></a></li></ul><h3>Advantages and disadvantages of Arrays:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/0*dpce15ofbdl3-80Z.jpg" /></figure><h4>Advantages:</h4><p><strong>1.</strong> Reading an array element is simple and efficient. This is because any element can be instantly read using indexes (base address calculation behind the scene) without traversing the whole array.</p><p><strong>2.</strong> Array is a foundation of other data structures. For example, other data structures such as <strong>Linked List</strong>, <strong>Stack</strong>, <strong>Queue</strong>, etc. are implemented using an array.</p><p><strong>3.</strong> All the elements of an array can be accessed using a single name (array name) along with the index, which is readable, userfriendly, and efficient rather than storing those elements in different-2 variables.</p><h4>Disadvantages:</h4><p><strong>1.</strong> While using an array, we just need to decide the size of the array in the beginning, so if we are not aware of how many elements we are going to store in the array, it would make the task difficult.</p><p><strong>2.</strong> The size of the array is fixed so if at a later point if we need to store more elements in it then it can’t be done. On the other hand, if we store less number of elements than the declared size, the remaining allocated memory is wasted.</p><h3>Applications of Array:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*Pxt6-2QvGmy5y7UaFYaung.png" /></figure><p>Apart from being widely used in programming, arrays have additional applications as well:</p><ul><li>Used in mathematical problems like matrices etc.</li><li>They are used in the implementation of other data structures like linked lists, stacks, queues, etc.</li><li>Database records are usually implemented as arrays.</li><li>Used in lookup tables by computer.</li><li>It effectively executes memory addressing logic wherein indices act as addresses to the one-dimensional array of memory.</li></ul><h3>About us:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*j50qSQoOp7tDlEBd.jpg" /></figure><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read: <a href="https://thecodepanda.medium.com/want-to-get-started-with-data-structure-5756f5b85c8f"><strong><em>Want to get started with Data Structure</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/panda-team-on-mission-tree-a-data-structure-dcc760d0ab42?source=user_profile---------0----------------------------"><strong><em>Learn About Trees</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------0----------------------------"><strong><em>Searching &amp; Sorting</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong>Let’s Draw a Roadmap for Competitive Coding</strong></a></p><p>If you are a beginner, you can start testing your coding skill in our <a href="https://thecodepanda.in/pandalab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading, Please support in comments for queries, suggestions, or appreciation.</p><p>See You Soon!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd80f9616087" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/array-a-well-known-data-structure-bd80f9616087">Array: A Well Known Data Structure</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Panda Team on Mission Tree: A data structure]]></title>
            <link>https://interviewnoodle.com/panda-team-on-mission-tree-a-data-structure-dcc760d0ab42?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcc760d0ab42</guid>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[trees]]></category>
            <category><![CDATA[competitive-programming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Thu, 21 Apr 2022 09:06:57 GMT</pubDate>
            <atom:updated>2022-04-25T05:56:01.459Z</atom:updated>
            <content:encoded><![CDATA[<p>Once upon, on a fine day. Panda Team finds out about the <strong>Kang: the Kangaroo</strong> makes a machine that shrinks down all the Trees in Panda village. As Domino is a Panda, he has to save all of his people. He picks <strong>Rubics</strong> to make a complete report on Trees. He uses that report to defeat Kang and save his village.</p><p>Here is the complete report by Rubics on Trees:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bhBubFhy6jB0AMUSpsxPvg.png" /><figcaption>Tree Data Structure By The Code Panda</figcaption></figure><h3>What is Tree?</h3><p>A Tree is a Non-Linear data structure that represents hierarchical data. A tree data structure is defined as a collection of <strong>objects</strong> or entities known as <strong>nodes</strong> that are linked together to represent or simulate hierarchy.</p><h4>Why Tree in Data structure?</h4><p>In order to perform any operation in a linear data structure <strong>(Array, Linked List) </strong>the time complexity increase with the increase in the data size. but, it is not accepted in today’s computational world.</p><p>The different tree data structure allows <strong><em>quicker and easier access </em></strong>to the data as it is a no-linear data structure.</p><p>Tree (with some ordering e.g.,<strong> BST</strong>) provides moderate access /search quicker than Linked list and slower than the array. The tree provides moderate insertion/ deletion (quicker than unordered Linked Lists). Like Linked Lists and unlike Arrays trees don’t have an upper limit on the number of nodes as nodes are linked using a pointer.</p><h3>Terminologies related to Tree Data Structure:-</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/0*Zt9KTqHMJ1CiayOL.png" /></figure><p><strong><em>1) Root:-</em></strong> The first node from where the tree originates is called the root node. In any tree, there must be only one root node.</p><p><strong><em>2) Edge:-</em></strong> The connecting link between any two node nodes is called an edge. In a tree with n number of nodes, there is exactly (n-1) number of edges.</p><p><strong><em>3) Parent:-</em></strong> The node which has a branch from it to any other node is called a parent node. In a tree, a parent can have any number of child nodes.</p><p><strong><em>4) Degree:-</em></strong> Degree of a node is the total number of children of that node. The degree of a tree is the highest degree of a node among all the nodes in the tree.</p><p><strong><em>5) Leaf Node:-</em></strong> The node which does not have a child is called a leaf node. Leaf nodes are also called external nodes or terminal nodes.</p><p><strong><em>6) Level:-</em></strong> In a tree, each step from top to bottom is called a level of a tree.</p><p><strong><em>7) Depth:-</em></strong> Total number of edges from the root node to a particular node is called the depth of that node.</p><p><strong><em>8) Height:-</em></strong> Total number of edges that lies on the longest path from any leaf node to a particular node is called the height of that node.</p><h3>Different Types of Binary Tree:-</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*Rv2a49UI_J-Fu7Qvy6raIw.gif" /></figure><p>There is various type of Trees in Data Structure. Every tree is unique and has its own purpose. But first, let’s see a list of all types of trees:</p><ol><li>Threaded Binary Tree</li><li>Huffman Tree</li><li>B Tree</li><li>General Tree</li><li>Forest</li><li>Binary Trees</li><li>Binary Search Trees</li><li>Expression Trees</li><li>Red-Black Tree</li><li>N-ary Tree</li><li>AVL Tree</li></ol><blockquote>Okay…great!! so I have to learn all these?</blockquote><p>NO, every tree is important but you don’t need to learn all. Even, Let’s have a small explanation of important one only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*LzIg9PeNuw_VXmSk.jpeg" /></figure><h4>Threaded Binary Tree:-</h4><figure><img alt="Threaded Binary Tree" src="https://cdn-images-1.medium.com/max/1000/0*Rst1VZ1pZ-zEut9J.png" /><figcaption>Threaded Binary Tree</figcaption></figure><p>The idea of a threaded binary tree is to make order traversal faster and do it without stack and recursion. A binary tree is made threaded by making a right child pointer that would normally be a null point to the inorder successor of the node (if it exists).</p><p><strong><em>Advantage:</em></strong></p><ul><li>No need for stacks or recursion</li></ul><p><strong><em>Disadvantages:</em></strong></p><ul><li>Insertion and deletion operation becomes more difficult</li></ul><h4>Huffman Tree:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Kxbqfn08I9p1vYnF.png" /></figure><p>The idea of the Huffman Tree is to construct a tree with the minimum external path weight.</p><p>Huffman tree or Huffman coding tree defines as a full binary tree in which each leaf of the tree corresponds to a letter in the given alphabet.</p><p><strong><em>Advantage:</em></strong></p><ul><li>easy to encode and decode</li></ul><p><strong><em>Disadvantages:</em></strong></p><ul><li>harder to encode and decode</li></ul><p><strong>B Tree:-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aVQ_7grPA6KiqIjj.png" /><figcaption>B Tree</figcaption></figure><p>B-tree is a self-balancing tree data structure that maintains a sorted data structure and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree generalizes the binary search tree, allowing for nodes with more than two children.</p><p><strong><em>Advantage:</em></strong></p><ul><li>keeps keys in sorted order for sequential traversing</li></ul><p><strong><em>Disadvantages:</em></strong></p><ul><li>Leaf and non-leaf nodes are of different size</li></ul><h4>Binary Trees:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/0*UVnlSPceIYwPB-sM.png" /></figure><p>A binary tree is a data structure that is defined as a collection of elements called nodes. In a binary tree, the topmost element is called the root node, and each node has<strong> 0, 1, or at the most 2 children</strong>. A node that has zero children is called a leaf node or a terminal node.<br> Every node contains a data element, a left pointer that points to the left child, and a right pointer that points to the right child.</p><p><strong><em>a)Complete Binary Trees:-</em></strong> A complete binary tree is a binary tree that satisfies two properties. First, in a complete binary tree, every level, except possibly the last, is completely filled. Second, all nodes appear as far left as possible.</p><p><strong><em>b)Extended Binary Trees:-</em></strong> A binary tree T is said to be an extended binary tree (or a 2-tree) if each node in the tree has either no child or exactly two children</p><p><strong><em>Advantage:</em></strong></p><ul><li>The main advantage of using binary trees is simplicity</li><li>used to reflect relationships between data</li></ul><p><strong><em>Disadvantages:</em></strong></p><ul><li>Deleting nodes is a complex procedure</li><li>Insertion, deletion, and search operations are dependent on the height of the tree</li></ul><h4>Binary Search Trees:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/0*aI1YOwHX0ceDXHjj.png" /></figure><p>A binary search tree, also known as an ordered binary tree, is a variant of a binary tree in which the nodes are arranged in an order.</p><p><strong><em>Advantage:</em></strong></p><ul><li>An ideal way to go with the hierarchical way of storing data.</li><li>Reflect structural relationships that exist in the given data set.</li><li>Make insertion and deletion faster than linked lists and arrays.</li><li>A flexible way of holding and moving data.</li><li>Are used to store as many nodes as possible.</li></ul><p><strong><em>Disadvantages:</em></strong></p><ul><li>It employs a recursive approach which requires more stack space.</li><li>Programming binary search algorithm is error-prone and difficult.</li><li>The interaction of binary search with memory hierarchy i.e. caching is poor.</li></ul><h4>Red-Black Tree:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/0*XHkDyvYCdB_zWd79.png" /></figure><p>Another kind of auto-balancing tree is red-black. According to the properties of the red-black tree, the red-black name is given because the <strong>Red-black tree has either red or Black painted on each node</strong>.<br> It maintains the balance of the forest. Even though this tree is not fully balanced, the searching operation only takes <strong>O (log n) time</strong>.<br> When the new nodes are added to the Red-Black Tree, nodes will be rotated to maintain the Red-Black Trees properties.</p><p><strong><em>Advantage:</em></strong></p><ul><li>Red-black trees balance the height of the binary tree.</li><li>The red-black tree takes less time to structure the tree by restoring the height of the binary tree.</li><li>The time complexity for search operation is O(log n)</li><li>It has comparatively low constants in a wide range of scenarios.</li></ul><p><strong><em>Disadvantages:</em></strong></p><ul><li>Even if you do need ordered data, red/black trees <strong>might not be perfect.</strong></li><li>In disk-based I/O, seeking is expensive compared to sequential block reading</li></ul><h4>AVL tree:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*wmuhnJZ4Oj-KjElS.png" /></figure><p>AVL tree is a binary search tree<strong> self-balancing</strong>. On behalf of the inventors <strong>Adelson-Velshi and Landis</strong>, the name AVL is given. This was the first tree that balanced dynamically. A balancing factor is allocated for each node in the AVL tree, based on whether the tree is balanced or not.<br>The height of the node kids is at most 1. AVL vine. In the AVL tree, the correct balance factor is 1, 0, and -1. If the tree has a new node, it will be rotated to ensure that it is balanced. It will then be rotated. Common operations such as viewing, insertion, and removal take <strong>O(log n)</strong> time in the AVL tree. It is mostly applied when working with Lookups operations.</p><p><strong><em>Advantage:</em></strong></p><ul><li>The height of the AVL tree is always balanced. The height never grows beyond log N, where N is the total number of nodes in the tree.</li><li>It gives better search time complexity when compared to simple Binary Search trees.</li><li>AVL trees have self-balancing capabilities.</li></ul><p><strong><em>Disadvantages:</em></strong></p><ul><li>As you can see, AVL trees are difficult to implement.</li><li>In addition, AVL trees have high constant factors for some operations. …</li><li>Most STL implementations of the ordered associative containers (sets, multisets, maps, and multimaps) use red-black trees instead of AVL trees.</li></ul><h3>Conclusion:</h3><p>So, Here is the complete report provided by Rubics about Trees.</p><blockquote>Ohh Rubics, What is this? I asked you to write about real Trees? What You have written? — Domino</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*KhdmJjSC2iJxfJGg76ORTA.png" /></figure><blockquote>Ohh Sorry, I thought, you said me to write on Trees in Data Structure. Never mind, this can also be useful. HEHE! — Rubics</blockquote><h3>About us:</h3><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read: <a href="https://thecodepanda.medium.com/want-to-get-started-with-data-structure-5756f5b85c8f"><strong><em>Want to get started with Data Structure</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/search-sort-a-algorithm-ride-7919b1923585?source=user_profile---------0----------------------------"><strong><em>Searching &amp; Sorting</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong>Let’s Draw a Roadmap for Competitive Coding</strong></a></p><p>If you are a beginner, you can start testing your coding skill in our <a href="https://thecodepanda.in/pandalab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading, Please support in comments for queries, suggestions, or appreciation.</p><p>See You Soon!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcc760d0ab42" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/panda-team-on-mission-tree-a-data-structure-dcc760d0ab42">Panda Team on Mission Tree: A data structure</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Search & Sort: A Algorithm Ride]]></title>
            <link>https://interviewnoodle.com/search-sort-a-algorithm-ride-7919b1923585?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/7919b1923585</guid>
            <category><![CDATA[sorting-algorithms]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[searching-algorithm]]></category>
            <category><![CDATA[competitive-programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Tue, 12 Apr 2022 09:15:05 GMT</pubDate>
            <atom:updated>2022-04-12T09:18:30.495Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Coders, Pico this side. I am sure you guys are missing me. Well, I was busy, being in a team full of boys is not easy. They always keep fighting over silly things.</p><p>Do you know what happen last time? they are fighting over whose technique of searching for Villains is best. I am completely fed up with this. First, they create a problem and then ask Rubics to solve it. So, here we are another topic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*VlcXUZCBJ9xOhNp1uJrsSw.png" /><figcaption>Searching &amp; sorting: The Code Panda</figcaption></figure><h3>SEARCHING:-</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*VTvJnmydXAUMWouwb-IQdQ.gif" /><figcaption>Searching</figcaption></figure><p>Not even a single day pass, when we do not have to search for something in our day-to-day life, car keys, books, pen, mobile charger, and whatnot. The same is the life of a computer, there is so much data stored in it, that whenever a user asks for some data, the computer has to search its memory to look for the data and make it available to the user. And the computer has its own techniques to search through its memory fast.<br> Well, to search for an element in a given array, there are two popular algorithms available:</p><p><strong><em>1) Linear Search<br> 2) Binary Search</em></strong></p><h4>LINEAR SEARCH:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*m6Ni_Ry4iRIPMHY44uy49A.gif" /><figcaption>Linear Search</figcaption></figure><p>Linear search is a very basic and simple search algorithm. In Linear search, we search for an element or value in a given array by traversing the array from the starting, till the desired element or value is found. It compares the element to be searched with all the elements present in the array and when the element is matched successfully, it returns the index of the element in the array, else it returns -1. Linear Search is applied on unsorted or unordered lists when there are fewer elements in a list.</p><p><strong><em>Feature’s of Linear Search:-</em></strong><br> 1) It is used for an unsorted and unordered small list of elements.<br> 2) It has a time complexity of O(n), which means the time is linearly dependent on the number of elements, which is not bad, but not that good too.<br> 3) It has a very simple implementation.</p><h4>BINARY SEARCH:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*h84gYOnC-h8OhGVTeTk7yA.gif" /><figcaption>Binary Search</figcaption></figure><p>Binary Search is applied on the sorted array or list of large size. Its time complexity of O(log n) makes it very fast as compared to other sorting algorithms. The only limitation is that the array or list of elements must be sorted for the binary search algorithm to work on it.</p><p><strong><em>Following are the steps of implementation that we will be following:</em></strong></p><p>1) Start with the middle element:<br> 2) If the target value is equal to the middle element of the array, then return the index of the middle element.<br> 3) If not, then compare the middle element with the target value,<br> 4) If the target value is greater than the number in the middle index, then pick the elements to the right of the middle index, and start with Step 1.<br> 5) If the target value is less than the number in the middle index, then pick the elements to the left of the middle index, and start with Step 1.<br> 6) When a match is found, return the index of the element matched.<br> 7) If no match is found, then return -1.</p><p><strong><em>Feature’s of Binary Search:- </em></strong><br> 1) It is used for only sorted arrays and the size of the array doesn’t matter.<br> 2) It has a time complexity of <strong><em>O(log N)</em></strong>, which means the time is not linearly dependent on the number of elements.</p><h4>INDEXED SEQUENTIAL SEARCH:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*HiMNzAJ1CiK1akRn0sOY7w.gif" /><figcaption>INDEXED SEQUENTIAL SEARCH</figcaption></figure><p>Index search is a special search. This search method is used to search a record in a file. Searching a record refers to searching for the location loc in the memory where the file is stored. Indexed search searches the record with a given key value relative to a primary key field. This search method is accomplished by the use of pointers. The index helps to locate a particular record with less time. Indexed sequential files use the principle of index creation.</p><p><strong><em>Features of Indexed Sequential Search:-</em></strong></p><ol><li>In Indexed Sequential Search a sorted index is set aside in addition to the array.<br> 2) Each element in the index points to a block of elements in the array or another expanded index.<br> 3) The index is searched 1st then the array and guides the search in the array.</li></ol><h3>SORTING:-</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*ZMssbSvz8wOfJWd-NY5FUg.gif" /><figcaption>Sorting: By Netflix</figcaption></figure><p>Now let’s talk about some of the popular sorting techniques. There are so many things in our real life that we need to search for, like a particular record in the database, roll numbers in the merit list, a particular telephone number in the telephone directory, a particular page in a book, etc. All this would have been a mess if the data was kept unordered and unsorted, but fortunately, the concept of sorting came into existence, making it easier for everyone to arrange data in order, hence making it easier to search. Sorting arranges data in a sequence which makes searching easier.<br>so what is the real meaning of sorting:- <strong><em>Sorting</em></strong> is nothing but arranging the data in ascending or descending order. The term sorting came into the picture, as humans realized the importance of searching quickly.</p><p>Some of the popular sorting techniques are as follows:-</p><p><strong><em>1) Bubble Sort<br> 2) Insertion Sort<br> 3) Selection Sort<br> 4) Merge Sort<br> 5) Heap Sort</em></strong></p><p>Let’s discuss this sorting one by one in detail:-</p><h4>BUBBLE SORT:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*qC2DXyBZtyG5a__Zd5AlZg.gif" /><figcaption>Bubble sort</figcaption></figure><p>Bubble Sort is a simple algorithm that is used to sort a given set of n elements provided in form of an array with n number of elements.</p><p>Bubble Sort compares all the elements one by one and sorts them based on their values. If the given array has to be sorted in ascending order, then bubble sort will start by comparing the first element of the array with the second element, if the first element is greater than the second element, it will swap both the elements, and then move on to compare the second and the third element, and so on.</p><p>It is known as bubble sort, because with every complete iteration the largest element in the given array, bubbles up towards the last place or the highest index, just like a water bubble rises up to the water surface.</p><p>Sorting takes place by stepping through all the elements one-by-one and comparing them with the adjacent element and swapping them if required.</p><p><strong><em>Feature’s of Bubble sort:-</em></strong></p><ol><li>The time complexity of Bubble Sort is O(n2).</li><li>The space complexity for Bubble Sort is O(1), because only a single additional memory space is required i.e. for the temp variable.</li><li>Also, the best case time complexity will be O(n), which is when the list is already sorted.</li></ol><h4>INSERTION SORT:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*UpB6EEJZB8HihhERZWxC-A.gif" /><figcaption>INSERTION SORT</figcaption></figure><p>Insertion sort works as sorting a deck of cards. It starts from index 1(not 0), and each index starting from index 1 is like a new card, that you have to place at the right position in the sorted subarray on the left.</p><p>It is efficient for smaller data sets but very inefficient for larger lists. Insertion Sort is adaptive, which means it reduces its total number of steps if a partially sorted array is provided as input, making it efficient. It is better than Selection Sort and Bubble Sort algorithms. Its space complexity is less.</p><p>Like bubble sort, insertion sort also requires a single additional memory space. It is a stable sorting technique, as it does not change the relative order of elements that are equal.</p><p><strong><em>Feature’s of Insertion sort :- </em></strong><br> 1) Worst CaseTime Complexity O(n2).<br> 2) Space Complexity: O(1)</p><h4>SELECTION SORT:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2H2kYDgD0u2kAM8xXrvC5w.gif" /><figcaption>SELECTION SORT</figcaption></figure><p>Selection sort is conceptually the simplest sorting algorithm. This algorithm will first find the smallest element in the array and swap it with the element in the first position, then it will find the second smallest element and swap it with the element in the second position, and it will keep on doing this until the entire array is sorted. It is called selection sort because it repeatedly selects the next smallest element and swaps it into the right place.</p><p>Selection Sort requires two nested for loops to complete themselves.</p><p><strong><em>Feature’s of Selection Sort:-</em></strong></p><ol><li>Worst-case time complexity O(n2).</li><li>Average time Complexity θ(n2).</li><li>Space Complexity: O(1).</li></ol><h4>MERGE SORT:-</h4><p>Merge Sort follows the rule of Divide and Conquer to sort a given set of numbers/elements, recursively, hence consuming less time. Merge sort runs in O(n*log n) time in all the cases. Before jumping on to, how merge sort works and its implementation, first let&#39;s understand what is the rule of Divide and Conquer?</p><h4>Divide and Conquer:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*opwN0BhtH4zvPF697fPlow.gif" /><figcaption>Divide &amp; Conquer</figcaption></figure><p>If we can break a single big problem into smaller subproblems, solve the smaller sub-problems and combine their solutions to find the solution for the<br>original big problem, it becomes easier to solve the whole problem. In Merge Sort, the given unsorted array with n elements is divided into n sub-arrays, each having one element because a single element is always sorted in itself. Then, it repeatedly merges these sub-arrays, to produce new sorted sub-arrays,<br>and in the end, one complete sorted array is produced.</p><p>The concept of Divide and Conquer involves three steps:<br> 1) Divide the problem into multiple small problems.<br> 2) Conquer the subproblems by solving them. The idea is to break down the problem into atomic subproblems, where they are actually solved.<br> 3) Combine the solutions of the subproblems to find the solution to the actual problem.</p><p><strong><em>Feature’s of Merge Sort:-</em></strong></p><ol><li>Worst Case Time Complexity O(n*log n).</li><li>Average Time Complexity θ(n*log n).</li><li>Space Complexity: O(n).</li></ol><h4>HEAPSORT:-</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*LVcbTeL6zPLfDHiQ2w3Jtw.gif" /><figcaption>HEAPSORT</figcaption></figure><p>Heap Sort is one of the best sorting methods being in place and with no quadratic worst-case running time. Heap sort involves building a Heap data structure from the given array and then utilizing the Heap to sort the array. Heap is a special tree-based data structure, that satisfies the following special heap properties:</p><p><strong><em>Shape Property:</em></strong> Heap data structure is always a Complete Binary Tree, which means all levels of the tree are fully filled.<br><strong><em>Heap Property:</em></strong> All nodes are either greater than or equal to or less than or equal to each of its children. If the parent nodes are greater than their child nodes, the heap is called a MaxHeap, and if the parent nodes are smaller than their child nodes, the heap is called Min-Heap.</p><p><strong><em>Features of Heapsort:-</em></strong></p><ol><li>Worst Case: O(n log n).</li><li>Average Case: O(n log n).</li></ol><h3>About Us:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/233/0*K9n2ahsUAUYqRn9S.png" /></figure><h4>About us:</h4><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read: <a href="https://thecodepanda.medium.com/want-to-get-started-with-data-structure-5756f5b85c8f"><strong><em>Want to get started with Data Structure</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/walk-like-a-snake-a-python-beginners-roadmap-d3011359c735"><strong>Walk like a Snake: A Python Beginners Roadmap</strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong>Let’s Draw a Roadmap for Competitive Coding</strong></a></p><p>If you are a beginner, you can start testing your coding skill in our <a href="https://thecodepanda.in/pandalab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading, Please support in comments for queries, suggestions, or appreciation.</p><p>See You Soon!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7919b1923585" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/search-sort-a-algorithm-ride-7919b1923585">Search &amp; Sort: A Algorithm Ride</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do you want to feel Data Structures?: A Kinda Roadmap]]></title>
            <link>https://interviewnoodle.com/do-you-want-to-feel-data-structures-a-kinda-roadmap-c65c7b78510?source=rss-3fc0ca1f89cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c65c7b78510</guid>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[data-structures-course]]></category>
            <category><![CDATA[competitive-programming]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[The Code Panda]]></dc:creator>
            <pubDate>Mon, 04 Apr 2022 05:09:48 GMT</pubDate>
            <atom:updated>2022-04-05T10:29:53.440Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Coders, I am <strong><em>Domino</em></strong> and I am here with my computer expert <strong><em>Rubics. </em></strong>I am here to discuss <strong><em>“Data Structure”.</em></strong></p><p>Before we begin, let me tell you guys where it all begins. As you all know that I decided to learn <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81">Competitive coding</a> this year. <strong><em>( </em></strong><a href="https://thecodepanda.medium.com/walk-like-a-snake-a-python-beginners-roadmap-d3011359c735"><strong><em>You know why</em></strong></a><strong><em>)</em></strong></p><p>Now I am stuck and Confused about Data Structure.</p><blockquote><strong><em>Domino:</em></strong> Rubics, Buddy, there are too many data structures and I don’t know if they are language-dependent or just universal. I have so many doubts regarding Data Structure like how we can read them, why we need any perticular data structure like a Link list or something. Please solve my quries buddy…</blockquote><blockquote><strong><em>Rubics: </em></strong>I understand your problem Domino. It happens with every beginner. The path is not clear or even sometimes, they don’t know Why we need any DS. So, Don’t worry, let me go through all DS and explain their need. I also make sure, you learn them in a roadmap model.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*fCJKxh5sdOXCz6nLN4kjCA.png" /><figcaption>Data Structure roadmap thecodepanda</figcaption></figure><p>So guys, Let’s start today’s Blog with</p><h3><strong><em>What is Data Structure?</em></strong></h3><p>No seriously, I am not going to discuss what <a href="https://en.wikipedia.org/wiki/Data_structure">Google</a> says. Let’s understand them in this manner.</p><p>Data structure sounds like, any data which has some kind of structure. For example, an array can have the structure of symmetric datatype (int for example). So, basically, a data structure holds more than one value with some kind of rule and helps us to perform various tasks.</p><blockquote><strong><em>Domino:</em></strong> Rubics, Which data structure should I learn, and is data structures are language-dependent?</blockquote><p>No, Data Structures are not language-dependent, why do you think that data structures are language-dependent?</p><blockquote><strong><em>Domino: </em></strong><em>Actually, When I was learning Python, I don’t see Array or Linked List. I learn List, Tuple etc.</em></blockquote><p>Ohh…Yes, Most people think like that, actually, data structures are not language-dependent, they are concepts. There are various reasons you don’t see Arrays or LinkedList in Python:</p><ol><li><a href="https://www.python.org/"><strong><em>Python</em></strong></a> is an Interpreter based language due to which memory management is different and Most of the things are dynamic.</li><li>In Python, they actually use all basic data structures like an array or Linked list but in the background, the List, Tuple, or Dictionary uses basic data structures like a linked list, Heap in the background.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/1*bLk13hPh_ZF3FhkEdmyNlw.png" /><figcaption>Get Started</figcaption></figure><h3>RoadMap Of Data Structure</h3><blockquote><strong><em>Domino:</em></strong> Okay Rubics, Now I get what is Data Structure and your explanation is completely different. I kinda like it. But Now, Please give me a roadmap or Topics or data structure that I must know to start in competitive coding.</blockquote><p>Before I explain all basic data structures, If you are a Python/JS developer, you may not need these data structures in your python career but knowing them is best for you, as it enhances your knowledge.</p><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures"><strong><em>Python/JS</em></strong></a> has its own data structures like objects, arrays, lists, etc which perform quite advanced operations.</p><p>We are going to cover the C language Data structure, after all, C is our mother language.</p><ol><li>Array</li><li>Structure/Union</li><li>Stack</li><li>Queue</li><li>Linked List</li><li>Tree</li><li>Graph</li></ol><p><strong><em>Note: </em></strong><em>I am not including a string in this list as in some languages, it is treated as a Data type. In some, it is a class or library but most of its behavior is similar to Array.</em></p><p>In this article, I only explain why we need them, what is the problem in the last Data structure, and their use case. For knowing in deep, <a href="https://thecodepanda.medium.com/"><strong><em>stick with us</em></strong></a>. We are planning to write all data structures one by one in the next few weeks.</p><h3>Array:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*M5HBBKcXUgLst6-tOeUKYA.jpeg" /><figcaption>Array: The Code Panda</figcaption></figure><ul><li>Arrays are defined as the collection of similar types of data items stored at contiguous memory locations.</li><li>Arrays are the derived data type in C programming language which can store the primitive type of data such as int, char, double, float, etc.</li><li>Array is the simplest data structure where each data element can be randomly accessed by using its index number.</li></ul><h4>Why We Need Them:</h4><p>The main problem with Datatypes is that they can’t hold multiple data in a single variable that&#39;s why we need arrays.</p><h4>The benefit of using Array:</h4><p>you can store as much value as you want. You don’t need lots of variables to store similar values.</p><h3>Structure/Union:</h3><p>Structure or union are similar to arrays but they also store different types of data type values whereas arrays can only store similar data type values.</p><h4>Why We Need Them:</h4><p>The array can only store similar types of values, for example, they can only store either marks(int) or names(string) but they can’t store both in a single variable that’s why we need Structure/Union.</p><p>For more <a href="https://www.quora.com/What-is-the-difference-between-the-array-structure-union"><strong><em>read</em></strong></a>.</p><h3>Stack:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*AdDsvuuhMgQ16JpvmgOLDA.jpeg" /><figcaption>Stack: A concept Image</figcaption></figure><ol><li>Stack is a linear data structure that follows the LIFO (Last In First Out) approach for accessing elements.</li><li>Push, pop, and top (or peek) are the basic operations of a stack.</li></ol><h4>Why We Need Them:</h4><p>The problem with the array is that if you have to add an item at last or you have to fetch any item at last (and you don’t know the length of the array), then you have to traverse the whole array.</p><p>But in the stack, we always know the index of the last item, it will be easy for us to insert(push) or delete(pop) the last item.</p><h4>Applications of a stack:</h4><ul><li>Check for balanced parentheses in an expression<br>• Evaluation of a postfix expression<br>• Problem of Infix to postfix conversion<br>• Reverse a string</li></ul><h3>QUEUE:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AboJXKnGe0mBZWudwPZu8w.jpeg" /><figcaption>QUEUE in Data structure: The code Panda</figcaption></figure><ul><li>A queue can be defined as an ordered list that enables insert operations to be at one end called REAR and delete operations to be performed at another end called FRONT.<br>• Queue is referred to be as the FIFO(First In First Out) list.<br>• For example, people waiting in line for a rail ticket form a queue.</li></ul><h4>Why We Need Them:</h4><p>The problem with the stack is that we only get the last value, but what if we got a problem where we have to pick an item from the first place and insert any item at last. The stack can only help us insert data at last.</p><p>Here we keep track of the first item index and last item index. Insert is called as Enqueue and deletion is called as Dequeue.</p><p><strong><em>Note:</em></strong> <em>There is a memory problem with the simple queue that&#39;s why you also learn other versions like a circular queue.</em></p><h4>LINKED LIST:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YtdJbfecu-CuvOCfISz7Dg.jpeg" /><figcaption>Linked List: The Code Panda</figcaption></figure><ul><li>A linked list is a data structure that has a sequence of nodes where every node is connected to the next node by means of a reference pointer.</li><li>The elements are not stored in adjacent memory locations. They are linked using pointers to form a chain. This forms a chain-like link for data storage.</li><li>Each node element has two parts: a data field and a reference (or pointer) to the next node.</li></ul><h4>Why We Need Them:</h4><p>The problem with the array, stack, or queue is that when we have to add or remove any item in the middle of the array then we need to perform a complete swap, which also increases our computation.</p><p>The benefit of using a Linked List is that every node is very flexible, you can remove it or connect any new node very easily in the linked list without performing any swapping.</p><p><strong><em>Note:</em></strong> <em>There are various problems with the simple linked list that’s why you also learn other versions like a doubly link list.</em></p><h3>TREE:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*Z3WBKQUfIccipTLlOQLMSg.jpeg" /><figcaption>Tree: the code panda</figcaption></figure><ul><li>A tree is also one of the data structures that represent hierarchical data.</li><li>A tree data structure can be defined recursively as a collection of nodes, where each node is a data structure consisting of a value and a list of references to nodes.</li><li>The start of the tree is the “root node” and the reference nodes are the “children”.</li></ul><h4>Why We Need Them:</h4><p>This is a bit interesting, a tree is basically used to increase searching and sorting operations. All the data structures, we have read till now are slow in case of search or sorting. Think about any sorting technique, it always takes O(n²) times. But tree takes approx O(log n) time.</p><p>Now I think you get why we need Trees. There are various types of trees. We are planning to post a descriptive article about <strong><em>Trees</em></strong> next Monday. so, keep <a href="https://thecodepanda.medium.com/"><strong><em>following</em></strong></a> us.</p><h3>GRAPH:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*yORfuN4Ef7B9CWfmGgKNvw.jpeg" /><figcaption>Graphs: The Code Panda</figcaption></figure><p>• A graph can be defined as a group of vertices and edges that are used to connect these vertices.<br>• A graph can be seen as a cyclic tree, where the vertices (Nodes) maintain any complex relationship among them instead of having a parent-child relationship.</p><p>Graph G(V. E) with 5 vertices (A, B, C, D, E) and six edges ((A,B), (B,C), (C,E), (E,D), (D,B), (D,A)) is shown in the above figure.</p><h4>Why We Need Them:</h4><p>The graph is something you need to learn despite the language. Lots of programming problems are solved using graphs. For example, Uber/Swiggy uses graphs to figure out best and fastest route.</p><h3>Conclusion:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*uooGdJNEiLgvI1-d.jpg" /><figcaption>Conclusion: the code panda</figcaption></figure><blockquote><strong><em>Domino: </em></strong>It seems alot to me, but now i understand that, I need to start from Array and learn till graph. Rubics can you provide me order to learn DS.</blockquote><p>There is no such order for learning DS. I already told you, why you need any DS. What is the problem with the last DS so that we need a new one? But Still read something like that:</p><blockquote>Array -&gt; Structure -&gt; Union -&gt; Stack -&gt; Queue -&gt; Linked List -&gt; Tree -&gt; Graph -&gt; Heap</blockquote><h3>About Us:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/233/0*XdQ4FuchbzRcTmc-.png" /></figure><p>About us:</p><p>Follow us on <a href="https://thecodepanda.medium.com/"><strong><em>medium</em></strong></a> to get a complete journey topic by topic or follow on <a href="https://www.facebook.com/thecodepanda.in"><strong><em>Facebook</em></strong></a>, <a href="https://thecodepanda.quora.com/"><strong><em>Quora</em></strong></a>, <a href="https://linkedin.com/company/thecodepanda">L<strong><em>inkedIn</em></strong></a> or connect with the <a href="https://www.facebook.com/groups/242224570957499"><strong><em>community</em></strong></a> on Facebook. Read our <a href="https://thecodepanda.in/blog/index.html"><strong><em>other blogs</em></strong></a>.</p><p>Read: <a href="https://thecodepanda.medium.com/want-to-get-started-with-data-structure-5756f5b85c8f"><strong><em>Want to get started with Data Structure</em></strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/walk-like-a-snake-a-python-beginners-roadmap-d3011359c735"><strong>Walk like a Snake: A Python Beginners Roadmap</strong></a></p><p>Read: <a href="https://thecodepanda.medium.com/lets-draw-a-roadmap-for-competitive-coding-ba014adfee81"><strong>Let’s Draw a Roadmap for Competitive Coding</strong></a></p><p>If you are a beginner, you can start testing your coding skill in our <a href="https://thecodepanda.in/pandalab"><strong><em>code lab</em></strong></a>.</p><p>Thank you for reading, Please support in comments for queries, suggestions, or appreciation.</p><p>See You Soon!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c65c7b78510" width="1" height="1" alt=""><hr><p><a href="https://interviewnoodle.com/do-you-want-to-feel-data-structures-a-kinda-roadmap-c65c7b78510">Do you want to feel Data Structures?: A Kinda Roadmap</a> was originally published in <a href="https://interviewnoodle.com/">InterviewNoodle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>