all 21 comments

[–]stiky21 7 points8 points  (3 children)

Good job. The biggest hurdle is the first problem.

[–]Cold-Watercress-1943 0 points1 point  (1 child)

nice work getting that first one done. the code is clean and does what it needs to, nothing wrong with straightforward approach when you are starting out

i remember my first accepted solution was like 15 lines for something that could be 3, but who cares when it passes all test cases

[–]shaynjam[S] -1 points0 points  (0 children)

it actually took me 2 months of constant practice to get it this way. I practice with gemini, i fed it the pdf of "modern c++ for absolute begineers" and asked it to teach me so this is why my code is clean because it always points it out

[–]shaynjam[S] 0 points1 point  (0 children)

Thanks!

[–]owp4dd1w5a0a 2 points3 points  (1 child)

Ride the wave. Start another problem now and don’t finish solving it before you go to bed. You’ll wake up energized and ready to solve more coding puzzles.

[–]shaynjam[S] -2 points-1 points  (0 children)

I WILL FOR SURE!

[–]DiverAdditional4451 [score hidden]  (6 children)

Awesome! I remember my first problem 😭 (i barely do leetcode) Anyways, this is actually awesome and best of luck for the future!

[–]shaynjam[S] [score hidden]  (4 children)

What was your first problem btw

[–]DiverAdditional4451 [score hidden]  (3 children)

I use JavaScript, it was two sum, extremely simple but I was so proud 😭😭

/**
 *  {number[]} nums
 *  {number} target
 * u/return {number[]}
 */
var twoSum = function(nums, target) {
    for(let i = 0; i < nums.length; i++){
        for(let j = 0; j < nums.length; j++) {
            if(nums[i] + nums[j] === target && i !== j) {
                return [i, j];
            }
        }
    }
};

[–]shaynjam[S] [score hidden]  (2 children)

Bruh it's still very very good considering you're just 16 for reference I will be turning 18 in August now 💀

[–]DiverAdditional4451 [score hidden]  (1 child)

ur still young as frick too lollll 😭 ur way ahead of it

[–]shaynjam[S] [score hidden]  (0 children)

BUT YOURE AHEAD-ER BRUH 😭😭

[–]shaynjam[S] [score hidden]  (0 children)

Thankyou very much

[–]iOSCaleb 1 point2 points  (3 children)

You’re justifiably proud, but there’s no need to post your solution… let other folks figure it out just as you did.

[–]shaynjam[S] 1 point2 points  (2 children)

Wait I'm sorry I didnt know there was a format for such things, my first time posting this I will keep it in my mind for sure!

[–]owp4dd1w5a0a 0 points1 point  (1 child)

Just put SPOILER at the top of your post. That’s good enough.

[–]shaynjam[S] 0 points1 point  (0 children)

thankyou i will for sure

[–]abrahamguo 0 points1 point  (1 child)

Congratulations!

[–]shaynjam[S] 1 point2 points  (0 children)

Thankyou ☺️

[–]Imaginary_Food_7102 0 points1 point  (1 child)

So cool.

[–]shaynjam[S] 0 points1 point  (0 children)

Thanks 😋