<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yashwanth</title>
    <description>The latest articles on DEV Community by Yashwanth (@yashwanthambati).</description>
    <link>https://dev.to/yashwanthambati</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F168928%2Fbf282d93-e65b-4c55-aacc-c67b7b8cab0c.jpeg</url>
      <title>DEV Community: Yashwanth</title>
      <link>https://dev.to/yashwanthambati</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yashwanthambati"/>
    <language>en</language>
    <item>
      <title>Body BackgroundColor change with Date object</title>
      <dc:creator>Yashwanth</dc:creator>
      <pubDate>Thu, 25 Jul 2019 20:56:45 +0000</pubDate>
      <link>https://dev.to/yashwanthambati/body-backgroundcolor-change-using-date-object-309h</link>
      <guid>https://dev.to/yashwanthambati/body-backgroundcolor-change-using-date-object-309h</guid>
      <description>&lt;p&gt;If you want to try out Date object in javascript ,this is a perfect example.&lt;/p&gt;

&lt;p&gt;There are differnt methods in date object. I used &lt;strong&gt;getHours()&lt;/strong&gt; method to change the color according to time.&lt;br&gt;
Here is the html code&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TEVSi83s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ol5jwxvyrkc7bi9x05ko.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TEVSi83s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ol5jwxvyrkc7bi9x05ko.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the code for javascript code&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uYzOQvFT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jo2so7ihel0ophvlbkgj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uYzOQvFT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jo2so7ihel0ophvlbkgj.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here is the codepen &lt;a href="https://codepen.io/yashwan46084805/pen/GVjopq"&gt;link&lt;/a&gt; if you want play/implement.&lt;/li&gt;
&lt;li&gt;If you want to get deeper into Date methods, then have a look at MDN &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date"&gt;docs&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Post your best use of Date in comments and love to see yours.Hope you like this  example.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Good Stuff&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How I created my first Vs code Snippet for React ??and boom React Hooks snippet.</title>
      <dc:creator>Yashwanth</dc:creator>
      <pubDate>Sun, 14 Jul 2019 09:17:54 +0000</pubDate>
      <link>https://dev.to/yashwanthambati/how-i-created-my-first-vs-code-snippet-for-react-and-boom-react-hooks-snippet-461c</link>
      <guid>https://dev.to/yashwanthambati/how-i-created-my-first-vs-code-snippet-for-react-and-boom-react-hooks-snippet-461c</guid>
      <description>&lt;p&gt;Everyone has special and perhaps, particular, tastes when it comes to their code editor. There are literally hundreds of snippets out there for react, and for good reason: enhancement to productivity for faster code.&lt;br&gt;
Snippets play a handy role in code editors when you want write code repeatedly,it frustrate the things up.&lt;/p&gt;

&lt;p&gt;Its one of the things that i wanted to be a publisher in vscode,so I created a extension for react hooks which is handy for react devs and inspired by Live server extension in vscode.&lt;/p&gt;

&lt;h1&gt;
  
  
  #Fire it up
&lt;/h1&gt;

&lt;p&gt;Before you do anything, you’re going to install vsce (short for Visual Studio Code Extensions) and establish yourself as a publisher. All of the instructions to do so are here. I know it looks like a lot, but it takes anywhere from 5-10 minutes, and then you'll never have to do it again, for any extension you create.&lt;/p&gt;

&lt;p&gt;Now that you’ve got that under your belt, here are the steps you need to start work.&lt;/p&gt;

&lt;p&gt;First, you need to run:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fi6ljjl39lguh15l0mqc5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fi6ljjl39lguh15l0mqc5.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This makes the generator globally available on your machine (meaning you can now create a snippet in any directory). You can then execute this command to kick off your snippet:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fymbnedpwvzga4weybc47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fymbnedpwvzga4weybc47.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will be prompted by a screen that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fphmg8x9i13xz1dtjm9zh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fphmg8x9i13xz1dtjm9zh.PNG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When selecting this, it asks if this is a new snippet or if we want to import from an existing one. We want to create a new one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuwgzw739z8qxp7ploded.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuwgzw739z8qxp7ploded.PNG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, you'll have to answer a few other questions, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What’s the extension's name?&lt;/li&gt;
&lt;li&gt;What is the the identifier? (I just went with the name, that’s probably typical.)&lt;/li&gt;
&lt;li&gt;What is the the description? (I just put something silly in initially. Don’t worry, you can update this in your package.json in the future.)&lt;/li&gt;
&lt;li&gt;What's the publisher's name? (See earlier instructions.)&lt;/li&gt;
&lt;li&gt;Language id: 'javascript' (preference which ever u like)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It will set you up with a snippet to start creating your own on &lt;strong&gt;snippets.json&lt;/strong&gt; file. The full scoop and &lt;a href="https://code.visualstudio.com/api/get-started/your-first-extension" rel="noopener noreferrer"&gt;all the details are here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  #Research
&lt;/h1&gt;

&lt;p&gt;Research for a code snippet? Probably! But I was genuinely curious: what would work best for the vast majority of people, while still being something I liked?&lt;br&gt;
So I thought react hooks has been trending then I give it a shot.&lt;/p&gt;

&lt;h1&gt;
  
  
  Features
&lt;/h1&gt;

&lt;p&gt;Hooks are supported: &lt;code&gt;useState&lt;/code&gt;, &lt;code&gt;useEffect&lt;/code&gt;, &lt;code&gt;useContext&lt;/code&gt;, &lt;code&gt;useCallback&lt;/code&gt;,&lt;code&gt;useMemo&lt;/code&gt; ,&lt;code&gt;useRef&lt;/code&gt;,and &lt;code&gt;useReducer&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1 import useState
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;imrus&lt;/code&gt; to  "Import React, { useState }"&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fl8me7c12aj8pxv5wnpf9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fl8me7c12aj8pxv5wnpf9.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2 import useEffect
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;imrue&lt;/code&gt; to  "Import React, { useEffect }"&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fimboy7hliowcxrce9wgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fimboy7hliowcxrce9wgb.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3 import useContext
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;imruc&lt;/code&gt; to  "Import React, { useContext }"&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fko1tcpp2lnhiowdczvu8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fko1tcpp2lnhiowdczvu8.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4 useState
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;ust&lt;/code&gt; to usestate&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frtbx9tzc2qv3ehzrtk25.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frtbx9tzc2qv3ehzrtk25.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5 useEffect
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;uef&lt;/code&gt; to useEffect&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fe53my6uedwop23q9b73p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fe53my6uedwop23q9b73p.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6 useContext
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;uct&lt;/code&gt; to useContext&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbgum1q7d1b7uo13zdkg3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbgum1q7d1b7uo13zdkg3.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7 useCallback
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;ucb&lt;/code&gt; to useCallback&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmmz6r22w8gnrbcb3mwgp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmmz6r22w8gnrbcb3mwgp.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  8 useMemo
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;umo&lt;/code&gt; to useMemo&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3qlngrukvgqcea7zvbam.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3qlngrukvgqcea7zvbam.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  9 useReducer
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;urd&lt;/code&gt; to useReducer&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fji7wgysy9nqtmber53mx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fji7wgysy9nqtmber53mx.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  10 useRef
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;urf&lt;/code&gt; to useRef&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fg6kc2d256wa7yn6mfmck.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fg6kc2d256wa7yn6mfmck.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  #Conclusion
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;If you want to download this extension &lt;a href="https://marketplace.visualstudio.com/items?itemName=AYashwanth.react-hooks" rel="noopener noreferrer"&gt;here is the link&lt;/a&gt; and also my github repo &lt;a href="https://github.com/yashwanthambati/react-hook-snippet" rel="noopener noreferrer"&gt;link&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Isn't it crazy that you become a vscode publisher instantly in few days.&lt;/li&gt;
&lt;li&gt;If you have any doubts regarding code and publishing on Vs code marketplace,
here is &lt;a href="https://code.visualstudio.com/api/working-with-extensions/publishing-extension" rel="noopener noreferrer"&gt;the link&lt;/a&gt;. If you stuck in any place if free to discuss and or else ping me. &lt;/li&gt;
&lt;li&gt;Dan abramov is creator of react hooks furtherly check the links for &lt;a href="https://reactjs.org/docs/hooks-intro.html" rel="noopener noreferrer"&gt;react hooks&lt;/a&gt; and making sense of React hooks &lt;a href="https://dev.to/dan_abramov/making-sense-of-react-hooks-2eib"&gt;post&lt;/a&gt; on Dev Community. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you for reading&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Love Love&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Big-O Notation Useful guide</title>
      <dc:creator>Yashwanth</dc:creator>
      <pubDate>Mon, 01 Jul 2019 18:27:34 +0000</pubDate>
      <link>https://dev.to/yashwanthambati/big-o-notation-complete-guide-226h</link>
      <guid>https://dev.to/yashwanthambati/big-o-notation-complete-guide-226h</guid>
      <description>&lt;p&gt;Two important things to remember while coding are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Readability and &lt;/li&gt;
&lt;li&gt;Scalability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are many ways to solve a problem but a good developer always strive for better efficeint code and performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3uohubbcm8hivqm0il85.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3uohubbcm8hivqm0il85.PNG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There comes the Big-O part to scale the time and space complexity of a algorithm/problem.It is helpful in determining the complexity and also scale the performance of algorithm.&lt;/p&gt;

&lt;p&gt;Different Big-O terms are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;O(1) - Constant time&lt;/li&gt;
&lt;li&gt;O(n) - Linear time&lt;/li&gt;
&lt;li&gt;O(n^2) - Quadratic time &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  O(1) - Constant Time complexity
&lt;/h1&gt;

&lt;p&gt;The constant Time complexity explains that &lt;strong&gt;no matter what size of the input or output, the execution time and the resources used will always be the same&lt;/strong&gt;. No matter how many times or where the algorithm is executed, it produces same performance all the time. For example: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F50qt88du7kcogvs4x3i5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F50qt88du7kcogvs4x3i5.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  O(n): Linear Time Complexity
&lt;/h1&gt;

&lt;p&gt;If an algorithm has linear complexity, then &lt;strong&gt;execution time and/or resources used are directly proportional to the input size&lt;/strong&gt;. For example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fsjy6khtlfp5c5n74bsyd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fsjy6khtlfp5c5n74bsyd.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  O(n2): Quadratic Time Complexity
&lt;/h1&gt;

&lt;p&gt;The quadratic complexity is present when the &lt;strong&gt;impact of the algorithm is directly proportional to the square of the input size&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzt3ecy5fouxu2gn0y7zq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzt3ecy5fouxu2gn0y7zq.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This complexity is common in sorting algorithms like bubble sort, insertion sort, and the selection sort.&lt;/p&gt;

&lt;p&gt;Here are some of Tricky examples &lt;br&gt;
This is a good example, if the function takes two different inputs,so Big-O changes to &lt;strong&gt;O(input1 + Input2)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftorwgi05dqb8ypunqh0r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftorwgi05dqb8ypunqh0r.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For above example,if it is a &lt;strong&gt;nested for Loop&lt;/strong&gt; then the Big-O changes to &lt;strong&gt;O(input1*input2)&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Big-O cheatSheet and Graph
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frima9qhnlltvnf1eaft4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frima9qhnlltvnf1eaft4.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F12p50w5c0x37g75uo9hx.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F12p50w5c0x37g75uo9hx.PNG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to discuss more tricky examples.&lt;br&gt;
Thank you for reading.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>algorithms</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
