<?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: nithya dharshini</title>
    <description>The latest articles on DEV Community by nithya dharshini (@nithya_dharshini_a5a4075f).</description>
    <link>https://dev.to/nithya_dharshini_a5a4075f</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%2F3252067%2Fc5752153-6f40-45b4-8d13-44f5e3bf9d52.png</url>
      <title>DEV Community: nithya dharshini</title>
      <link>https://dev.to/nithya_dharshini_a5a4075f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nithya_dharshini_a5a4075f"/>
    <language>en</language>
    <item>
      <title>🎯 CSSBattle September 2 Puzzle – My Solution</title>
      <dc:creator>nithya dharshini</dc:creator>
      <pubDate>Sun, 21 Sep 2025 12:49:40 +0000</pubDate>
      <link>https://dev.to/nithya_dharshini_a5a4075f/cssbattle-september-2-puzzle-my-solution-om8</link>
      <guid>https://dev.to/nithya_dharshini_a5a4075f/cssbattle-september-2-puzzle-my-solution-om8</guid>
      <description>&lt;p&gt;I just solved the CSSBattle Sep 2 puzzle and wanted to share my approach.&lt;br&gt;
At first, I tried building the shape using 3 sticks (rectangles), but then I got stuck on how to bend them into curves.&lt;/p&gt;

&lt;p&gt;That’s when I realized 👉 overflow: hidden plays a major role in shaping elements!&lt;/p&gt;

&lt;p&gt;So instead of bending sticks, I used circles, a rectangle, and overflow hidden to cut out the exact shape I needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqhx5yisvo1gmr8ridyjq.png%3Fw%3D200" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqhx5yisvo1gmr8ridyjq.png%3Fw%3D200" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s my code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="main"&amp;gt;
     &amp;lt;div class="rect"&amp;gt;
       &amp;lt;div class="circle"&amp;gt;
          &amp;lt;div class="in-circle"&amp;gt;
              &amp;lt;div class="stick"&amp;gt;&amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt; 
     &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;style&amp;gt;
      *{
          background:#5DBCF9;
          box-sizing:border-box;
          margin:0;
          padding:0;
          height:100vh;
      }

    .rect{
        display:flex;
        align-items:center;
        justify-content:center;
        height:180px;
        width:285px;
        overflow:hidden;
    }

    .main{
        display:flex;
        align-items:center;
        justify-content:center;
    }

     .circle{
          background:#FFFFCD;
          width:280px;
          height:330px;
          border-radius:50%;
          display:flex;
          align-items:center;
          justify-content:center;
     }

    .in-circle{
          display:flex;
          background:#5DBCF9;
          width:180px;
          height:240px;
          border-radius:50%;
          align-items:center;
          justify-content:center;
    }

   .stick{
       display:flex;
       width:50px;
       height:250px;
       background:#FFFFCD;
   }
&amp;lt;/style&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;✅ Learning:&lt;/p&gt;

&lt;p&gt;overflow: hidden is super powerful to trim and shape elements without needing complex curves.&lt;/p&gt;

&lt;p&gt;Sometimes the simplest trick works better than trying to bend or distort shapes manually.&lt;/p&gt;

&lt;p&gt;What do you think about this approach? Would love to hear if you solved it differently! 🚀&lt;/p&gt;

</description>
      <category>cssbattle</category>
      <category>cschallenge</category>
      <category>htmlandcss</category>
      <category>structure</category>
    </item>
    <item>
      <title>🚀 My Dev Journey Begins + Swapping Genders in SQL (LeetCode Problem)</title>
      <dc:creator>nithya dharshini</dc:creator>
      <pubDate>Sun, 20 Jul 2025 15:38:33 +0000</pubDate>
      <link>https://dev.to/nithya_dharshini_a5a4075f/my-dev-journey-begins-swapping-genders-in-sql-leetcode-problem-3l5h</link>
      <guid>https://dev.to/nithya_dharshini_a5a4075f/my-dev-journey-begins-swapping-genders-in-sql-leetcode-problem-3l5h</guid>
      <description>&lt;p&gt;Hi everyone! 👋&lt;br&gt;
I'm starting this dev journal to track my weekly progress in software development and problem solving. I’m currently focusing on strengthening my foundations in Data Structures, Algorithms, and Database SQL through platforms like LeetCode.&lt;/p&gt;

&lt;p&gt;This journal is not only to document what I solve, but also how I think, improve, and learn — and hopefully, someone else finds it useful too!&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;a href="https://leetcode.com/problems/swap-salary/description/" rel="noopener noreferrer"&gt;First Problem: Swapping 'm' and 'f' in SQL&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This week's problem was from LeetCode:&lt;/p&gt;

&lt;p&gt;Goal: Swap all 'm' and 'f' values in the sex column using a single SQL update statement, without using any intermediate tables or SELECT queries.&lt;/p&gt;

&lt;p&gt;Here's the table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;Table&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Salary&lt;/span&gt;

&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="c1"&gt;-------------+----------+&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="k"&gt;Column&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="k"&gt;Type&lt;/span&gt;     &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="c1"&gt;-------------+----------+&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;          &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;      &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;        &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;varchar&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;sex&lt;/span&gt;         &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;ENUM&lt;/span&gt;     &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;      &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;      &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="c1"&gt;-------------+----------+&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="c1"&gt;----+------+-----+--------+&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="c1"&gt;----+------+-----+--------+&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;2500&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;1500&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="k"&gt;C&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;5500&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;D&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="c1"&gt;----+------+-----+--------+&lt;/span&gt;

&lt;span class="k"&gt;Output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="c1"&gt;----+------+-----+--------+&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="c1"&gt;----+------+-----+--------+&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;2500&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;1500&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="k"&gt;C&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;5500&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;D&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;   &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;    &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="c1"&gt;----+------+-----+--------+&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👣 My Approaches&lt;br&gt;
🔹 First Attempt (Basic CASE logic)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;Salary&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;CASE&lt;/span&gt;
             &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'m'&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'f'&lt;/span&gt;
             &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'f'&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'m'&lt;/span&gt;
          &lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It worked fine, but I wondered if I could simplify it.&lt;/p&gt;

&lt;p&gt;🔸 Second Attempt (Shorter CASE)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;CASE&lt;/span&gt;
             &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'m'&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'f'&lt;/span&gt;
             &lt;span class="k"&gt;ELSE&lt;/span&gt; &lt;span class="s1"&gt;'m'&lt;/span&gt;
          &lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This still gave the correct result — because sex only has 'm' and 'f', so ELSE 'm' is safe.&lt;/p&gt;

&lt;p&gt;🟢 Final Attempt (IF-based)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;Salary&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'m'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'f'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'m'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This version is short, clean, and very readable. I believe it's the most efficient and expressive for this case.&lt;/p&gt;

&lt;p&gt;✅ I'm sticking with this as my final version (unless there's a hidden SQL performance nuance I missed — feel free to comment!).&lt;/p&gt;

&lt;p&gt;💭 &lt;strong&gt;Reflection&lt;/strong&gt;&lt;br&gt;
Even a simple-looking problem made me think about different ways to write conditional updates. This helped me:&lt;/p&gt;

&lt;p&gt;Practice CASE vs IF&lt;/p&gt;

&lt;p&gt;Learn how to simplify logic without breaking correctness&lt;/p&gt;

&lt;p&gt;Think about readability and maintainability in SQL&lt;/p&gt;

&lt;p&gt;That’s it for this week!&lt;br&gt;
Next time, I’ll share more problems, learnings, and maybe some frontend/devlog thoughts too. Thanks for reading! 💻✨&lt;/p&gt;

</description>
      <category>leetcode</category>
      <category>beginners</category>
      <category>database</category>
    </item>
  </channel>
</rss>
