Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Does anyone else struggle with arrays?
2 points by DumbArray on Nov 17, 2022 | hide | past | favorite | 9 comments
I find it difficult to implement low-level array-based algorithms and data structures (sort, queues, stacks, etc.) from scratch, even though I'm proficient at software development in general. Is this a common thing?



Generally, pretty efficient implementations of such should be already provided in most core libraries along with the data structures in question.

Are you practicing for l33tcode or something?


Yeah, this question was prompted by leetcode lol <grimaces>


Could you be more specific what you find difficult? That will help others provide you with guidance.


If you've never programmed in a lower-level language before, then it's a new skill that you have to build from the ground-up. Just keep practicising and you'll get better quickly - it's not that hard.


No (in those good times, "software development" was not overloaded to mean everything/anything so that all is said to be proficient at it).


Definitely it is easy to mistake 𝘪 for 𝘪+1 (or is it 𝘪-1?)


Which is more efficient?


It is not so much as which is efficient as which is correct. Implementing many algorithms it is easy to pick the wrong one which is most problematic when it gives answers that are almost right.

Pro tip. Unit tests are super effective for algorithms that are tricky. Write some simple test cases and understand how they work using the debugger.


yep to this day and age i still google how to array sorr in javascript.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: