<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ishantlearning on Medium]]></title>
        <description><![CDATA[Stories by Ishantlearning on Medium]]></description>
        <link>https://medium.com/@ishantlearning2001?source=rss-db0d49fd1f85------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZU6sDIlfLUUunh0T</url>
            <title>Stories by Ishantlearning on Medium</title>
            <link>https://medium.com/@ishantlearning2001?source=rss-db0d49fd1f85------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 19:56:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ishantlearning2001/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GeeksForGeeks GeekBits Reward Prediction]]></title>
            <link>https://medium.com/@ishantlearning2001/geeksforgeeks-geekbits-reward-prediction-5ec919192413?source=rss-db0d49fd1f85------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ec919192413</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[geeksforgeeks]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Ishantlearning]]></dc:creator>
            <pubDate>Sat, 01 Aug 2026 11:18:08 GMT</pubDate>
            <atom:updated>2026-08-01T11:18:08.440Z</atom:updated>
            <content:encoded><![CDATA[<h3>GeekBits Reward Prediction</h3><p>Hello coders,</p><p>I am solving GFG POTD from last many days and able to achieve a longest streak of 291 days. I am curious to know when I will get the goodies based on the GFG GeekBits points system</p><p><strong>What is GeekBits point system(for those who don’t know):</strong></p><p>A user earns 1 GeekBit for solving the Problem of the Day (POTD).</p><p>Additionally, for every 8th consecutive POTD solved, the user receives an extra 8 GeekBits as a streak bonus.</p><p>For example:</p><p>Days 1–7: Earn 1 GeekBit each day.</p><p>Day 8: Earn 1 GeekBit (daily reward) + 8 bonus GeekBits = 9 GeekBits.</p><p>The streak then continues, and the next bonus is awarded on the 16th consecutive day, then on the 24th day, and so on.</p><p><strong>I wrote a program for this, where you just have to enter three details and you will get the date.</strong></p><p>1. How many points you have?</p><p>2. How many points you want?</p><p>3. How many days remaining for the coming Bonus day(You will get this from GFG POTD page)</p><p>Java Code:</p><pre>import java.time.LocalDate;<br>import java.util.Scanner;<br><br>/**<br> * Problem statement: In GFG(GeeksForGeeks), when you solve a POTD, user will rewarded with 1 geekbit and when this streak<br> * level reached to 8 days, user will awarded with extra 8 geekbits.<br> * It means, between two bonus geekbits there should be a difference of 7 days exclusively of both start and end day.<br> */<br><br>public class DesignGFGgeekbitsProblem {<br>    public static void main(String[] args) {<br>        /**<br>         * Required parameters are:<br>         * How many current geekbits user have.<br>         * How many geekbits user want<br>         * How many days remaining to go for bonus geekbits.<br>         *<br>         * It will tell you the date by which you will have the geekbits that you want.<br>         */<br>        Scanner input = new Scanner(System.in);<br>        int currentGeekBits = 0, wantedGeekBits = 0, daysRemainingForBonusGeekBits = 0;<br>        try {<br>            System.out.println(&quot;Enter the Geekbits you have:&quot;);<br>            currentGeekBits = input.nextInt();<br>            System.out.println(&quot;Enter how many geekbits you want:&quot;);<br>            wantedGeekBits = input.nextInt();<br>            System.out.println(&quot;How many days remaining for bonus geekbits: &quot;);<br>            daysRemainingForBonusGeekBits = input.nextInt();<br>        } catch (Exception e) {<br>            System.out.println(&quot;Please provide valid integers for the input fields&quot;);<br>            return;<br>        }<br>        // basic validations:<br>        if(currentGeekBits &gt; wantedGeekBits) {<br>            System.out.println(&quot;Current GeekBits can not be greater than the wanted geek bits&quot;);<br>            return;<br>        }<br>        if(!(daysRemainingForBonusGeekBits &gt;= 0 &amp;&amp; daysRemainingForBonusGeekBits &lt;= 7)) {<br>            System.out.println(&quot;Days remaining should be between 0 and 7&quot;);<br>            return;<br>        }<br>        LocalDate expectedDate = getExpectedDate(currentGeekBits, wantedGeekBits, daysRemainingForBonusGeekBits);<br>        System.out.print(&quot;Expected date to collect &quot; + wantedGeekBits+ &quot; from today is : &quot;+ expectedDate);<br>    }<br><br>    private static LocalDate getExpectedDate(int currentGeekBits, int wantedGeekBits, int daysToGoForBounsPoints) {<br>        LocalDate todayDate = LocalDate.now();<br>        int need = wantedGeekBits - currentGeekBits;<br><br>        if(need &lt;= 0) return todayDate;<br>        if(daysToGoForBounsPoints == 0) daysToGoForBounsPoints = 7;<br>        int days = 0;<br>        while(need &gt; 0) {<br>            need--;<br>            days++;<br><br>            if(daysToGoForBounsPoints == 0) {<br>                // Bonus day<br>                need -= 8;<br>                daysToGoForBounsPoints = 7;<br>            } else {<br>                daysToGoForBounsPoints--;<br>            }<br>        }<br>        return todayDate.plusDays(days);<br>    }<br>}</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1tr5ZtR4UllrfscfwKWnTQ.png" /></figure><p>Please let me know in comments, how much you liked this post and if there any issues you are facing in the calculation or suggestions…please comment.</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ec919192413" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>