<?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: Sajal Gupta</title>
    <description>The latest articles on DEV Community by Sajal Gupta (@salroid).</description>
    <link>https://dev.to/salroid</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%2F14072%2F7a8a22e2-8fad-442e-b5f6-13c6ca43c10f.jpeg</url>
      <title>DEV Community: Sajal Gupta</title>
      <link>https://dev.to/salroid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/salroid"/>
    <language>en</language>
    <item>
      <title>Angry Doge Demo 🐶 | Using HTML CSS</title>
      <dc:creator>Sajal Gupta</dc:creator>
      <pubDate>Fri, 02 Jul 2021 08:32:59 +0000</pubDate>
      <link>https://dev.to/salroid/angry-doge-demo-using-html-css-nna</link>
      <guid>https://dev.to/salroid/angry-doge-demo-using-html-css-nna</guid>
      <description>&lt;p&gt;An angry - cheerful dog created using pure CSS, HTML and vanilla JS.&lt;/p&gt;

&lt;p&gt;Check out the video demo on &lt;a href="https://youtu.be/1e1wOd2ffxo"&gt;https://youtu.be/1e1wOd2ffxo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/1e1wOd2ffxo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Checkout the web demo at &lt;a href="http://salroid.me/Doge/"&gt;http://salroid.me/Doge/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out the repository on GitHub: &lt;a href="https://github.com/salRoid/Doge"&gt;https://github.com/salRoid/Doge&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Awesome Text With Background Demo ✌🏼| Using HTML CSS</title>
      <dc:creator>Sajal Gupta</dc:creator>
      <pubDate>Thu, 13 May 2021 04:51:52 +0000</pubDate>
      <link>https://dev.to/salroid/awesome-text-with-background-demo-using-html-css-4150</link>
      <guid>https://dev.to/salroid/awesome-text-with-background-demo-using-html-css-4150</guid>
      <description>&lt;p&gt;A web page with background-clipped text created using CSS with random image functionality by vanilla JS.&lt;/p&gt;

&lt;p&gt;Check out the video demo on &lt;a href="https://youtu.be/NCw-daFdiio"&gt;https://youtu.be/NCw-daFdiio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/NCw-daFdiio"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Check out the repository on GitHub: &lt;a href="https://github.com/salRoid/BackdropClipping-randomWallpaper/tree/master/City%20Lights"&gt;https://github.com/salRoid/BackdropClipping-randomWallpaper/tree/master/City%20Lights&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out my other video on O(1) solution of Range Sum Queries.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/IXQvj8BFE24"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Please like, share, and subscribe to the channel will be dropping a lot of things ❤️❤️.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Classic Problem of Range Sum Queries 😭</title>
      <dc:creator>Sajal Gupta</dc:creator>
      <pubDate>Thu, 15 Apr 2021 02:10:50 +0000</pubDate>
      <link>https://dev.to/salroid/classic-problem-of-range-sum-queries-263m</link>
      <guid>https://dev.to/salroid/classic-problem-of-range-sum-queries-263m</guid>
      <description>&lt;p&gt;I have been into competitive coding for the last 5 years and this is what I learned If you want to crack good coding interviews you need to be very good at problem-solving.&lt;/p&gt;

&lt;p&gt;The key to these interviews is not just solving the problem but give the optimized solution which takes very less time constraint.&lt;/p&gt;

&lt;p&gt;One of the classic problems people don't know the idea for an O(1) solution is RangeSumQueries.&lt;/p&gt;

&lt;p&gt;Problem Statement:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Given an array of N Elements.&lt;/li&gt;
&lt;li&gt;Multiple queries will be asked with inputs L, R where 0 &amp;lt;= L &amp;lt; R &amp;lt; N&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The user has to provide the Sum of elements in this range.&lt;/p&gt;

&lt;p&gt;Note: Don't fall for a naive brute force approach it will take a lot of time with increasing array size and multiple queries.&lt;/p&gt;

&lt;p&gt;Watch the video on my channel to find the solution using the auxialiary array.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/IXQvj8BFE24"&gt;https://youtu.be/IXQvj8BFE24&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;YouTube: &lt;iframe width="710" height="399" src="https://www.youtube.com/embed/IXQvj8BFE24"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Please like, share, and subscribe to my channel if you love the content.&lt;/p&gt;

</description>
      <category>softwareengineer</category>
      <category>algorithms</category>
      <category>learn</category>
      <category>problemsolving</category>
    </item>
    <item>
      <title>It's CSS not Photoshop | Dynamic Avengers City Lights</title>
      <dc:creator>Sajal Gupta</dc:creator>
      <pubDate>Sat, 10 Apr 2021 03:56:44 +0000</pubDate>
      <link>https://dev.to/salroid/it-s-css-not-photoshop-dynamic-avengers-city-lights-4pa7</link>
      <guid>https://dev.to/salroid/it-s-css-not-photoshop-dynamic-avengers-city-lights-4pa7</guid>
      <description>&lt;p&gt;Watch the 40-sec complete video demo in 1080p at &lt;a href="https://youtu.be/ehDiOgNNiXk"&gt;https://youtu.be/ehDiOgNNiXk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ehDiOgNNiXk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secret Ingredient&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    -webkit-text-stroke-width: 0.7px;
    -webkit-text-stroke-color: white;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also check out the video on background text clipping at &lt;a href="https://youtu.be/6G-juiJIU8E"&gt;https://youtu.be/6G-juiJIU8E&lt;/a&gt;&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/6G-juiJIU8E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Please like, share, and subscribe to my channel if you love the content ❤️❤️❤️.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Unbeatable Tic Tac Toe in C++</title>
      <dc:creator>Sajal Gupta</dc:creator>
      <pubDate>Thu, 08 Apr 2021 15:10:45 +0000</pubDate>
      <link>https://dev.to/salroid/unbeatable-tic-tac-toe-in-c-3711</link>
      <guid>https://dev.to/salroid/unbeatable-tic-tac-toe-in-c-3711</guid>
      <description>&lt;p&gt;What is a min-max algorithm?&lt;/p&gt;

&lt;p&gt;Minimax is a decision rule used in artificial intelligence, decision theory, game theory, statistics, and philosophy for minimizing the possible loss for a worst-case scenario.&lt;/p&gt;

&lt;p&gt;In this set, there are two players one is going to be the Winner &lt;strong&gt;(Maximizer)&lt;/strong&gt; and the other is going to be the Loser &lt;strong&gt;(Minimizer)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In our case, we want to create the computer that is always the winner so it is supposed to make the best move always?&lt;/p&gt;

&lt;p&gt;How does the computer decide on the best move?&lt;/p&gt;

&lt;p&gt;After the player has made its turn the computer simulates every possible move on the board. The computer assumes that the player will always make the worst move and reach the end case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;If (Computer Wins) {
   return 10; // Winning moves gives 10
} else {
   return 0; // Losing moves gives 0
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Every time we get 10 that's the move computer is going to make in order to win.&lt;/p&gt;

&lt;p&gt;There can be multiple 10 values then what to choose?&lt;/p&gt;

&lt;p&gt;Let's say we have a value called "DEPTH" - which tells you how fast the computer is going to win. &lt;/p&gt;

&lt;p&gt;Suppose 2 moves, Depth = 2;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;If (Computer Wins) {
   return 10 - Depth(2); //  Distinct values
} else {
   return 0; // Losing moves gives 0
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now the values will become distinct and the computer will always make the move where it gets the highest value after subtracting the depth.&lt;/p&gt;

&lt;p&gt;Watch my youtube video on Biased Dice UI.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ln8Qoo_MYwo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Unbeatable Tic Tac Toe code available at &lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/salRoid" rel="noopener noreferrer"&gt;
        salRoid
      &lt;/a&gt; / &lt;a href="https://github.com/salRoid/UnbeatableTicTacToe" rel="noopener noreferrer"&gt;
        UnbeatableTicTacToe
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      ❌⭕ An unbeatable Tic Tac Toe game with reliable artificial intelligence.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;UnbeatableTicTacToe&lt;/h1&gt;

&lt;/div&gt;

&lt;p&gt;An unbeatable Tic Tac Toe game with reliable artificial intelligence.&lt;/p&gt;

&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/salRoid/UnbeatableTicTacToe" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


</description>
      <category>minmaxalgorithm</category>
      <category>c</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>How I created biased dice.</title>
      <dc:creator>Sajal Gupta</dc:creator>
      <pubDate>Wed, 07 Apr 2021 03:27:36 +0000</pubDate>
      <link>https://dev.to/salroid/how-i-created-biased-dice-36ld</link>
      <guid>https://dev.to/salroid/how-i-created-biased-dice-36ld</guid>
      <description>&lt;p&gt;Can you create biased dice where the probability of getting an even number is more?&lt;/p&gt;

&lt;p&gt;The question was asked in MakeMyTrip interview.&lt;/p&gt;

&lt;p&gt;A dice has 6 states : {1, 2, 3, 4, 5, 6} and the problem is P{2, 4, 6} &amp;gt; P{1, 3, 5}.&lt;/p&gt;

&lt;p&gt;Can you &lt;strong&gt;create a mathematical function&lt;/strong&gt; to solve this problem without hampering the dice randomness?&lt;/p&gt;

&lt;p&gt;Follow up the below video lineups to find the solution or comment down your approach how you will solve it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int function DiceMoves() {

    // your code here

    return diceState;

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Watch my videos on the same:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/fdWEWPYJlE0"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ln8Qoo_MYwo"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pRNa9KhG_DY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Please like share and subscribe if love my videos.&lt;/p&gt;

&lt;p&gt;My solution code at:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i3JOwpme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/salRoid"&gt;
        salRoid
      &lt;/a&gt; / &lt;a href="https://github.com/salRoid/Random-Dice-Moves"&gt;
        Random-Dice-Moves
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Random-Dice-Moves&lt;/h1&gt;
&lt;/div&gt;

  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/salRoid/Random-Dice-Moves"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



</description>
      <category>html</category>
      <category>algorithms</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Create image inside a text.</title>
      <dc:creator>Sajal Gupta</dc:creator>
      <pubDate>Mon, 05 Apr 2021 02:55:42 +0000</pubDate>
      <link>https://dev.to/salroid/create-image-inside-a-text-3pec</link>
      <guid>https://dev.to/salroid/create-image-inside-a-text-3pec</guid>
      <description>&lt;p&gt;A web page with background-clipped text created using CSS with random image functionality by vanilla JS.&lt;/p&gt;

&lt;p&gt;Check out the video on &lt;a href="https://youtu.be/6G-juiJIU8E"&gt;https://youtu.be/6G-juiJIU8E&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/6G-juiJIU8E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Follow me on GitHub to find some of my projects: &lt;a href="https://github.com/salRoid"&gt;https://github.com/salRoid&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please like, share, and subscribe to the channel will be dropping a lot of things ❤️❤️.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Sum of digits of a number to a single-digit integer.</title>
      <dc:creator>Sajal Gupta</dc:creator>
      <pubDate>Mon, 29 Mar 2021 16:34:31 +0000</pubDate>
      <link>https://dev.to/salroid/sum-of-digits-of-a-number-to-a-single-digit-integer-3p1i</link>
      <guid>https://dev.to/salroid/sum-of-digits-of-a-number-to-a-single-digit-integer-3p1i</guid>
      <description>&lt;p&gt;Dropped another video on youtube this time it's a basic math problem but most of us don't think it in that direction.&lt;/p&gt;

&lt;p&gt;Go through the logic of this problem and enhance your knowledge.&lt;/p&gt;

&lt;p&gt;Check out the video on youtube: &lt;a href="https://youtu.be/9baLG_4gohE"&gt;https://youtu.be/9baLG_4gohE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow me on GitHub to find some of my projects: &lt;a href="https://github.com/salRoid"&gt;https://github.com/salRoid&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please like, share, and subscribe to the channel will be dropping a lot of things ❤️❤️.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>datastructures</category>
      <category>maths</category>
      <category>youtube</category>
    </item>
    <item>
      <title>Create Eyes Mouse Cursor Follow Up</title>
      <dc:creator>Sajal Gupta</dc:creator>
      <pubDate>Wed, 24 Mar 2021 05:26:33 +0000</pubDate>
      <link>https://dev.to/salroid/create-eyes-mouse-cursor-follow-up-1h04</link>
      <guid>https://dev.to/salroid/create-eyes-mouse-cursor-follow-up-1h04</guid>
      <description>&lt;p&gt;Just tried my hands on creating a video, Please follow up the coding session to make web elements move following the cursor using HTML, CSS, JS.&lt;/p&gt;

&lt;p&gt;A simple web page created in 10 minutes with a monk rotating eyes based on the mouse movement.&lt;/p&gt;

&lt;p&gt;Check out the video on youtube: &lt;a href="https://lnkd.in/gkadHNb"&gt;https://lnkd.in/gkadHNb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open source code: &lt;a href="https://lnkd.in/gh4KGyj"&gt;https://lnkd.in/gh4KGyj&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow me on GitHub to find some of my projects: &lt;a href="https://github.com/salRoid"&gt;https://github.com/salRoid&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please like, share, and subscribe to the channel will be dropping a lot of things ❤️❤️.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
