Hacker News new | comments | ask | show | jobs | submit login
I would like to share 500 Data Structure and Algorithms problems
126 points by kevin996 11 months ago | hide | past | web | favorite | 9 comments
You can find around 500+ data structure and algorithms problems here (http://www.techiedelight.com/list-of-problems/) that are helpful to improve your algorithmic skills and also to crack coding interview of top tech companies.

From: Discussion on reddit https://www.reddit.com/r/learnprogramming/comments/86seey/i_would_like_to_share_500_data_structure_and/





i second that !


In http://www.techiedelight.com/count-set-bits-using-lookup-tab... , the solution does not appear to be portable, that is, it uses the right shift of a signed number, and the C specification says (from http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf )

> The result of E1 >> E2 is E1 right-shifted E2 bit positions. ... If E1 has a signed type and a negative value, the resulting value is implementation-defined.

In practice it isn't a concern, as the most common compilers (gcc, clang, MSVC++) do what we expect.


Yes, it's only potentially different on CPUs with non-twos-complement arithmetic, which nobody has made in a long time. I think the last was the PDP-6 in 1963.

I'd prefer to have a C standard that specified everything you can count on in a modern implementation.


It was heavily discussed in https://news.ycombinator.com/item?id=14128145 (397 points, 11 months ago, 105 comments) and in other few posts.

Have you added something interesting recently?



Thank you for posting this.


Are challenge tasks like this a viable introduction to programming?


It helps to drill in basic syntax and increase your speed of thinking in the language. Also gives you an opportunity to practice debugging and optimization on a low complexity system, so you have all the concepts in your head when moving to a larger system.

It's really bad for things like project structure and tackling multiple complex, related problems. Bigger picture ideas get lost because of the scope of the problems.

Really depends on what you're trying to accomplish. Think of them as a set of flashcards. I'd say it's one of the better ways to bridge the gap between beginner programming books and actually building small, useful programs.




Applications are open for YC Summer 2019

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

Search: