<?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: Shaan Yadav</title>
    <description>The latest articles on DEV Community by Shaan Yadav (@shaanlabs).</description>
    <link>https://dev.to/shaanlabs</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3172889%2F1e368dae-7c5c-40d0-9494-5f3232552195.jpg</url>
      <title>DEV Community: Shaan Yadav</title>
      <link>https://dev.to/shaanlabs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shaanlabs"/>
    <language>en</language>
    <item>
      <title>LeetCode 3116 (Hard) — binary search + inclusion-exclusion makes it easy</title>
      <dc:creator>Shaan Yadav</dc:creator>
      <pubDate>Fri, 21 Aug 2026 09:53:53 +0000</pubDate>
      <link>https://dev.to/shaanlabs/leetcode-3116-hard-binary-search-inclusion-exclusion-makes-it-easy-19nd</link>
      <guid>https://dev.to/shaanlabs/leetcode-3116-hard-binary-search-inclusion-exclusion-makes-it-easy-19nd</guid>
      <description>&lt;p&gt;Full walkthrough: &lt;strong&gt;&lt;a href="https://www.youtube.com/watch?v=vFuFA3ByCs0" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=vFuFA3ByCs0&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;LeetCode 3116 — Kth Smallest Amount With Single Denomination Combination. Here’s the trick everyone misses:&lt;/p&gt;

&lt;p&gt;Brute force (generate all multiples, pick k-th) fails because k can reach 2×10⁹.&lt;/p&gt;

&lt;p&gt;The real approach:&lt;/p&gt;

&lt;p&gt;Binary search the answer X&lt;br&gt;
Count valid amounts ≤ X using inclusion-exclusion&lt;br&gt;
Odd subsets add, even subtract (bitmask over coins)&lt;br&gt;
LCM via GCD, break when LCM &amp;gt; X&lt;br&gt;
O(n · 2ⁿ · log(k·M)) — passes cleanly.&lt;/p&gt;

&lt;p&gt;The 26% acceptance rate makes this look harder than it is. Once you see the count(X) monotonic trick, it clicks.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>coding</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Started Writing Technical Articles on Medium — First Article on Sliding Window Algorithm in Java!</title>
      <dc:creator>Shaan Yadav</dc:creator>
      <pubDate>Sat, 17 May 2025 07:59:05 +0000</pubDate>
      <link>https://dev.to/shaanlabs/started-writing-technical-articles-on-medium-first-article-on-sliding-window-algorithm-in-java-5o5</link>
      <guid>https://dev.to/shaanlabs/started-writing-technical-articles-on-medium-first-article-on-sliding-window-algorithm-in-java-5o5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hey fellow developers! 👋&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m excited to share that I’ve recently started writing technical articles on Medium to document and share my learning journey.&lt;/p&gt;

&lt;p&gt;This all began after attending an inspiring session by Anu Sharma at the KIET Technoverse event, where I was encouraged to showcase my projects and concepts through writing.&lt;/p&gt;

&lt;p&gt;To kick things off, I wrote a detailed guide on solving the Smallest Distinct Window problem using the sliding window algorithm in Java — a classic but tricky coding interview problem.&lt;/p&gt;

&lt;p&gt;In the article, I cover:&lt;/p&gt;

&lt;p&gt;Understanding the problem step-by-step&lt;/p&gt;

&lt;p&gt;Brute force and optimized sliding window approaches&lt;/p&gt;

&lt;p&gt;Detailed Java code snippets with explanations&lt;/p&gt;

&lt;p&gt;Time and space complexity analysis&lt;/p&gt;

&lt;p&gt;If you’re prepping for interviews or want to strengthen your string and hashmap skills, this might be helpful!&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://medium.com/@shaanyworkspace/smallest-distinct-window-in-java-sliding-window-algorithm-explained-65726b4479da" rel="noopener noreferrer"&gt;Check out the full article here on Medium&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m looking forward to writing more and would love your feedback and suggestions!&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>java</category>
      <category>algorithms</category>
      <category>interviewprep</category>
    </item>
  </channel>
</rss>
