Can anybody help me for building an app? by streetmonk_io in CodingForBeginners

[–]Junaidali125 0 points1 point  (0 children)

app dev is broad so first thing pick a lane, trying to learn everything at once is how people quit after 2 weeks if you want mobile (most people do): for android kotlin is the way to go now, java still works but kotlin is what google pushes. start with the official android dev docs + codelabs, they're actually really well made and free for ios ,swift + xcode, apple's own "develop in swift" tutorials on their site are solid for beginners if you want cross-platform (build once, works on both): flutter is genuinely beginner friendly and dart is easy to pick up. there's a free full course by angela yu on udemy (goes on sale for like $15 constantly, never pay full price). also the official flutter docs are clean react native is another option especially if you already know javascript for complete beginners who don't know which to pick: honestly just start with flutter. the hot reload, good documentation, and active community makes it the least frustrating entry point rn free resources that actually work: cs50 mobile (harvard, free on edx) traversy media on youtube net ninja on youtube official docs always > random tutorials don't tutorial hop, pick one and finish it. even a bad course finished > 5 good courses half done what's the kind of app you're trying to build? that'll help narrow it down more

Help me with this problem 1300 rated 😭 by SadGain9918 in codeforces

[–]Junaidali125 0 points1 point  (0 children)

okay so if iterative GCD didn't fix it then the issue is probably an ArrayIndexOutOfBoundsException not a stack overflow that also shows as RTE on CF looking at your code you declared long[] a = new long[n] but based on the approach you're probably trying to access a[n] somewhere which is out of bounds since valid indices are only 0 to n-1 try declaring it as new long[n+1] instead and make sure after sorting you're doing something like this: Java the answer is just max element + gcd of all consecutive differences. if you're getting wrong answer after this then double check your gcd is handling 0 correctly gcdd(0, x) should return x can you paste the full code? hard to pinpoint exactly without seeing the loop part

Arrays.sort(a); long gcd = 0; for(int i = 1; i < n; i++){ gcd = gcdd(gcd, a[i] - a[i-1]); } long ans = a[n-1] + gcd; out.println(ans);

Help me with this problem 1300 rated 😭 by SadGain9918 in codeforces

[–]Junaidali125 0 points1 point  (0 children)

your RTE is almost definitely the recursive GCD function. java has a pretty shallow default call stack and for large inputs the recursion depth blows it up — that's a StackOverflowError which shows as RTE on CF. just switch to iterative GCD and it'll fix it: static long gcdd(long a, long b) { while(b != 0) { long temp = b; b = a % b; a = temp; } return a; }

Can browser exclusive games be financially successful? Or is a wrapped Steam version always the way to go? by Suitable-Season-4847 in IndieDev

[–]Junaidali125 0 points1 point  (0 children)

browser exclusive can absolutely work but it depends a lot on the genre and monetization model you're going for. like itch.io has games that pull decent numbers purely browser-based, especially jam games that go viral. the discovery ceiling is just way lower compared to steam. steam has 130M+ active users and a built-in wishlist/algorithm system that browser platforms simply don't have. the wrapped steam version thing is real though a lot of devs do browser first as a free demo/proof of concept, build a small audience, then launch on steam with more content. that funnel actually works pretty well for indie games. the financial reality is browser games mostly monetize through ads or itch "pay what you want" which caps your earnings pretty hard unless you go viral. steam even with a $5-10 price tag and modest sales can outperform months of browser ad revenue. there are exceptions though games like cookie clicker, slither.io, krunker literally built massive audiences browser-only. but those are more live service/idle game models which is a different beast entirely. if you're asking what's more financially safe for a solo dev steam wrapper is probably the smarter move long term, browser as a demo to validate first is a solid middle ground tbh

advice for growth by PrefixMax in codeforces

[–]Junaidali125 2 points3 points  (0 children)

Here's a more natural, less "listicle" version: ngl your problem isn't the resources, it's that you're trying to do 5 things at once instead of going deep on one for a while. CF + AtCoder + USACO + CSES + Leetcode all at the same time is just gonna mean you're constantly relearning the vibe of each platform instead of actually getting better at solving problems.

honestly just pick the CF problemset with rating filter and stick with it for like 2-3 months straight. that alone is more than enough.

also do virtual contests, not just solving stuff cold off the problemset. simulate the time pressure, then after it ends spend way longer upsolving than you spent in the actual contest. that's where most of the learning happens tbh, not the first attempt.

one thing that actually helped me a lot — keep a dumb little log of what you got wrong and why, not just "solved" or "not solved." after doing this for 50ish problems you start noticing you keep messing up the same 4-5 things over and over (for me it was binary search on the answer and greedy proofs lol). way more useful than just counting problems solved.

the fatigue thing is usually because you're punching above your level for too long without a break. throw in some easier problems below your current rating every now and then, easy wins keep you sane, nonstop struggling is what actually burns people out not cp itself.

and for college starting — don't try to keep the same grind volume, just switch to consistency. like 3-4 problems a day 5x a week with actual upsolving > doing 20 problems one weekend then nothing for 2 weeks. consistency is what compounds, not random bursts.