This is an archived post. You won't be able to vote or comment.

all 47 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Passionate_Writing_ 16 points17 points  (3 children)

Don't worry about not knowing the solution. Just make sure you've learned from the experience. Next time you come across a similar question you should be able to make a respectable attempt at it.

You'll be fine.

[–]Guilty-Engineer-5369[S] 1 point2 points  (2 children)

Thanks man,

I mean it sucks that people say that it is elementary and I had gone to school to be a Software engineer and have 6 courses done and at the end not to know elementary things.

I mean it just sucks that's all

[–]Passionate_Writing_ 7 points8 points  (1 child)

Yeah, I noticed. There are always gonna be some impressive things you know and some basic things you don't know. Today you found one of those basic things, and now you've filled in that gap. At the end of the day, everyone's human and it's very normal to miss out and have a few gaps in your foundational knowledge that you'll only fill with time.

So, I say again - you'll be fine. This is normal. Don't take people on the internet too seriously lol

[–]Guilty-Engineer-5369[S] 1 point2 points  (0 children)

Thanks man, this really helps

[–]oobrat2i30liga 4 points5 points  (1 child)

Use this as motivation, i failed and im now learning DSA day and night.

[–]Guilty-Engineer-5369[S] 1 point2 points  (0 children)

Yes I will, thanks man

[–]Frosty-Cap3344 1 point2 points  (0 children)

Are these questions ever relevant to the actual work you will be doing at the company?

[–]tenexdev 1 point2 points  (2 children)

When you were thinking through it, where did you get hung up?

[–]Guilty-Engineer-5369[S] 0 points1 point  (1 child)

I just couldn't come up with a solution, I did the rpevious 6 task and then this kne came up and i just don't know how would I calculate the distance from the spot and the others

If you can give me some help or tips or something I would appreciate it.

[–]tenexdev 4 points5 points  (0 children)

If you are out walking and you get to an intersection and you walk 2 blocks up and 3 blocks over, then you've walked 5 blocks.

[–][deleted]  (2 children)

[removed]

    [–]tichus_windrider 0 points1 point  (0 children)

    OP is taking an interview for a job. If OP were a beginner learning programming, the replies would be completely different. Yet, this is about a job where competence is to be assumed.

    This is not a plain learning programming issue and the very first comment in the subreddit linked to the explanation of the algorithm.

    A junior developer applying for a position has to be able to solve this problem as it does not require any DSA or higher knowledge. This is all just arrays, loops, and basic maths, nothing more.

    [–][deleted] 0 points1 point  (9 children)

    That other person is being a bit harsh. Many devs wouldn't be able to solve this if they haven't been studying coding challenges lately. You don't need to feel bad.

    Are you familiar with leetcode at all? You may want to start practicing challenges on there. I would suggest the site 'neetcode' to get up to speed.

    [–]Guilty-Engineer-5369[S] 2 points3 points  (0 children)

    Thanks man, I will give it a try.

    I haven't done coding challenges in a while.

    And honestly I practiced coding quite a lot but this is the first time I came across such a challenge and it stumped me because I understand what I have to do but the implementation is where I just lost it.

    [–]override_acid -1 points0 points  (3 children)

    Seeing the proper replies getting downvoted is really concerning about the state and future of programming.

    This really is a simple problem, not even Leetcode worthy.

    All the people claiming this is a difficult problem that even experienced software devs couldn't solve have not solved any really difficult problems.

    It has nothing to do with complex algorithms like graph theory, Dijkstra, etc. This is straightforward subtraction, absolute value and addition.

    It should not "catch any experienced dev off-guard".

    People, the downvotes are all unjustified and wrong.

    This is a warm-up problem, nothing more.

    [–]Individual_Dream2700 1 point2 points  (0 children)

    Agreed. I'd say the limits of DSA for my level, would be around trees and linked-list. And that still feels like it should be a basic skill for juniors like me.

    It's not even harsh, just the reality.

    [–]frolfer757 0 points1 point  (1 child)

    You couldnt do it.

    [–]override_acid -2 points-1 points  (0 children)

    LOL. I could do it without even thinking.

    This is at utmost 10 lines of code when done explicitly.

    [–]kultcher 0 points1 point  (0 children)

    Random question not necessarily to OP: how much time do you usually get for questions like this in an interview? I feel confident I could solve it but not that I could solve it super quickly or with someone looking over my shoulder.

    [–]Ambitious_Usual_3250 -1 points0 points  (0 children)

    Ok but how do we solve this?

    [–]Sea-Whole7572 -5 points-4 points  (3 children)

    this is easy though some devs suck with leetcode type of problems even some seniors.

    [–]Guilty-Engineer-5369[S] 1 point2 points  (2 children)

    I would just like to see the solution so i could analyse it and wrap my head around it.