<?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: Tridib Banik</title>
    <description>The latest articles on DEV Community by Tridib Banik (@tridibbanik17).</description>
    <link>https://dev.to/tridibbanik17</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%2F4023406%2Fcecb58b3-879f-4030-bba4-92207786a88b.jpg</url>
      <title>DEV Community: Tridib Banik</title>
      <link>https://dev.to/tridibbanik17</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tridibbanik17"/>
    <language>en</language>
    <item>
      <title>I Auto-Save Every Accepted HackerRank Solution to GitHub — Here's How</title>
      <dc:creator>Tridib Banik</dc:creator>
      <pubDate>Fri, 10 Jul 2026 04:33:04 +0000</pubDate>
      <link>https://dev.to/tridibbanik17/i-auto-save-every-accepted-hackerrank-solution-to-github-heres-how-4d3</link>
      <guid>https://dev.to/tridibbanik17/i-auto-save-every-accepted-hackerrank-solution-to-github-heres-how-4d3</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl19r3f7alretda2itn3m.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl19r3f7alretda2itn3m.png" alt="Cover image showing accepted HackerRank code submissions are automatically captured by PrepPush Chrome extension and are pushed to the user's GitHub." width="440" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I practice on &lt;strong&gt;HackerRank&lt;/strong&gt; a lot. The problems are fine, but I kept losing my own work.&lt;/p&gt;

&lt;p&gt;I'd solve something, move on, and weeks later I couldn't remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What trick I used&lt;/li&gt;
&lt;li&gt;The time/space complexity of &lt;em&gt;my&lt;/em&gt; solution&lt;/li&gt;
&lt;li&gt;Where I even saved the code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Copy-pasting into random files didn't scale. I wanted a &lt;strong&gt;GitHub repo that looked like interview prep&lt;/strong&gt;, not a junk drawer.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;&lt;a href="https://chromewebstore.google.com/detail/lkbbmepdmkokiapildnhkimcgnofokdd" rel="noopener noreferrer"&gt;PrepPush&lt;/a&gt;&lt;/strong&gt; — a Chrome extension that watches for &lt;strong&gt;Accepted&lt;/strong&gt; submissions and pushes them to &lt;strong&gt;your&lt;/strong&gt; GitHub repo automatically.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0xcd237ca5nufjnsxbjf.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0xcd237ca5nufjnsxbjf.png" alt="Screenshot showing the split Chrome window, where the right window showing a HackerRank submission and the left window shows the code submission, including AI analysis as code comments, in the user's dedicated GitHub repository." width="799" height="425"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The workflow I wanted
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Solve a problem on HackerRank&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Submit Code&lt;/strong&gt; until it's &lt;strong&gt;Accepted&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Code lands on GitHub — organized, labeled, ready to revise before interviews&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No manual copy-paste. No forgetting which approach was &lt;code&gt;approach1&lt;/code&gt; vs &lt;code&gt;approach2&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What shows up on GitHub
&lt;/h2&gt;

&lt;p&gt;Each accepted solution goes here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;solutions/{language}/{difficulty}/{problem-slug}/solution-approach1.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you solve the same problem with a &lt;strong&gt;different algorithm&lt;/strong&gt;, you get &lt;code&gt;solution-approach2.py&lt;/code&gt;, and so on.&lt;/p&gt;

&lt;p&gt;Re-submitting the &lt;strong&gt;same logic&lt;/strong&gt; updates the same file — no duplicate spam.&lt;/p&gt;

&lt;p&gt;Example header PrepPush adds to the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Link        https://www.hackerrank.com/challenges/alternating-characters/problem?isFullScreen=true
# Problem     Alternating Characters 
# Difficulty  Easy
# Subdomain   Strings
# Language    python3
# Submitted   2026-07-25, 10:46 a.m.
# Technique   linear-scan-adjacent-comparison
# Time        O(n)
# Space       O(1)
# Insight     The algorithm counts the total number of adjacent character pairs that are identical, which corresponds to the minimum number of deletions required to eliminate all consecutive duplicates.
# Interview   Before: "I could use a stack to track characters and pop duplicates." After: "A linear scan is more efficient at O(n) time and O(1) space, as we only need to compare each character with its immediate predecessor to identify necessary deletions."
# Pitfalls    (1) Failing to handle empty strings or single-character strings, which the code explicitly guards against to return zero.  (2) Incorrectly indexing the loop by starting at zero instead of one, which would cause an index out of bounds error when accessing the previous character.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;HackerRank link&lt;/strong&gt; is the first row so you can jump back to the problem anytime.&lt;/p&gt;




&lt;h2&gt;
  
  
  How PrepPush captures submissions
&lt;/h2&gt;

&lt;p&gt;PrepPush runs only on &lt;code&gt;hackerrank.com&lt;/code&gt; — including contest and prep-kit pages.&lt;/p&gt;

&lt;p&gt;When your submission is accepted:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;PrepPush captures the solution from HackerRank's submission data&lt;/li&gt;
&lt;li&gt;It pushes to your GitHub repo (it can create the repo on first push if your token allows)&lt;/li&gt;
&lt;li&gt;Optionally, &lt;strong&gt;Gemini&lt;/strong&gt; adds technique, Big-O, trick, and hint in the header&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A small toast appears on the page when capture succeeds. Open the extension from your toolbar if you want to see status or the AI analysis — push and analysis still run in the background either way.&lt;/p&gt;




&lt;h2&gt;
  
  
  One-time setup (~2 minutes)
&lt;/h2&gt;

&lt;p&gt;You bring your own keys. PrepPush does not host your code or credentials.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. GitHub personal access token
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create a &lt;strong&gt;classic&lt;/strong&gt; token with &lt;strong&gt;&lt;code&gt;repo&lt;/code&gt;&lt;/strong&gt; scope
&lt;a href="https://github.com/settings/tokens/new?scopes=repo&amp;amp;description=PrepPush" rel="noopener noreferrer"&gt;Generate token on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Expiration: &lt;strong&gt;90 days&lt;/strong&gt; or &lt;strong&gt;No expiration&lt;/strong&gt; — your choice&lt;/li&gt;
&lt;li&gt;Paste it in PrepPush &lt;strong&gt;Settings&lt;/strong&gt; → &lt;strong&gt;Test GitHub&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Gemini API key (optional)
&lt;/h3&gt;

&lt;p&gt;Only needed if you want AI notes in the file header.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free tier: &lt;a href="https://aistudio.google.com/apikey" rel="noopener noreferrer"&gt;Google AI Studio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Paste in PrepPush &lt;strong&gt;Settings&lt;/strong&gt; → &lt;strong&gt;Test AI&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F53wmu8dg20n2ftnhw8uw.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F53wmu8dg20n2ftnhw8uw.png" alt="Settings page of PrepPush Chrome extension containing spaces to insert GitHub token and Gemini key and test each of them out." width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it. Submit an accepted solution and check your repo.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I built it as an extension (not a script)
&lt;/h2&gt;

&lt;p&gt;HackerRank doesn't give you a clean "export all my solutions" button for the workflow I cared about.&lt;/p&gt;

&lt;p&gt;I needed something that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fires on &lt;strong&gt;Accepted&lt;/strong&gt; — not on Run/Compile&lt;/li&gt;
&lt;li&gt;Works on &lt;strong&gt;full-screen&lt;/strong&gt; and &lt;strong&gt;prep-kit&lt;/strong&gt; URLs&lt;/li&gt;
&lt;li&gt;Writes to &lt;strong&gt;my&lt;/strong&gt; repo structure, not a third-party server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Chrome extension made sense: local keys, no PrepPush backend, you own the data.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I learned shipping it
&lt;/h2&gt;

&lt;p&gt;Early users helped a lot. A few real-world fixes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SQL / DB2&lt;/strong&gt; problems needed correct file paths (&lt;code&gt;.sql&lt;/code&gt;, not &lt;code&gt;.py&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prep-kit&lt;/strong&gt; pages use different APIs than classic challenges — capture had to follow both&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI headers&lt;/strong&gt; had to reference &lt;em&gt;your actual code&lt;/em&gt;, not generic interview tips&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's a small project (~50 early users) but it solves a real problem for me every week.&lt;/p&gt;




&lt;h2&gt;
  
  
  Limitations (honest list)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Topic&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Platform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;HackerRank only — not LeetCode or Codeforces&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Trigger&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Submit Code → &lt;strong&gt;Accepted&lt;/strong&gt; — Run Code doesn't count&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Keys&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;You provide GitHub token + optional Gemini key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Privacy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Keys stay in Chrome on your device — see &lt;a href="https://github.com/tridibbanik17/PrepPush/blob/main/PRIVACY.md" rel="noopener noreferrer"&gt;privacy notes&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chrome Web Store:&lt;/strong&gt; &lt;a href="https://chromewebstore.google.com/detail/lkbbmepdmkokiapildnhkimcgnofokdd" rel="noopener noreferrer"&gt;Install PrepPush&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source / issues:&lt;/strong&gt; &lt;a href="https://github.com/tridibbanik17/PrepPush" rel="noopener noreferrer"&gt;github.com/tridibbanik17/PrepPush&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Demo video:&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=dXOZskTX2fM" rel="noopener noreferrer"&gt;YouTube walkthrough&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you use HackerRank for interview prep, I'd love feedback — what breaks, what's missing, what would make this a weekly habit for you.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;PrepPush is an independent project. Not affiliated with HackerRank, GitHub, or Google.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Question for you:&lt;/strong&gt; How do you track HackerRank solutions today — GitHub, Notion, or not at all? I'd love to hear what would make this workflow stick for you.&lt;/p&gt;

</description>
      <category>hackerrank</category>
      <category>chromeextension</category>
      <category>ai</category>
      <category>github</category>
    </item>
  </channel>
</rss>
