# The Algorithm Design Manual

All
Stack Overflow 18

This Year
Hacker News 2

This Month
Stack Overflow 5

All
Stack Overflow 18

This Year
Hacker News 2

This Month
Stack Overflow 5

leet code is a great place for practice problems

For algorithms this book is great https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1848000693/ref=sr_1_9?keywords=algorithms+book&qid=1554149281&s=gateway&sr=8-9

Also, if you are looking for a software engineering role you will also need to brush up on high level design like this video: https://www.youtube.com/watch?v=KmAyPUv9gOY

This is the one I used in college and I had it lying around, it's served me well.

https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1848000693/ref=sr_1_7?keywords=Algorithm&qid=1555780009&s=gateway&sr=8-7

I also got this book by a recommendation from a coworker, it has really nice visual displays for different algorithms.

https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/ref=sr_1_8?keywords=Algorithm&qid=1555780009&s=gateway&sr=8-8

This book is excellent:

The Algorithm Design Manual

This has been linked in other answers but is a good resource:

Skiena's Algorithms Lectures

Ryan,

Sounds like Knapsack problem to me, with the goal of minimizing the cost instead of weight. Think that the buy order is the sack that you have to fill in each day. There's a dynamic programming solution for this, it's elegant and require less memory. However I doubt that you can get historical data of how it is filled.

Random resources I get from internet: http://www.programminglogic.com/knapsack-problem-dynamic-programming-algorithm/

If you want to learn further, I would recommend you to read the explanation in [Algorithm design manual from Steven Skienna] (http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1848000693)

Hope this helps.

For python: http://interactivepython.org/runestone/static/pythonds/index.html

more general: www.amazon.com/dp/1848000693/

> they just threw all these mathematical proofs in without explaining how to solve it.

Could you explain what you mean by this?

For me the Algorithm Design Manual is the best I've ever read.

Hello, okay, this is a long path..

counting on u considering security in your web development path is very good.

but u need to start from the real fundamentals, which means diving right into web security can be intimidating right now, so u need to consider building the concrete ground first.

1) right now i think youre ready to use *data structures* in your code, they are more compact and more secure , if u havnt already, its time to learn it. + Algoritms.

here is a good book: https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1848000693/?pldnSite=1

​

2) Head for Clean Coding and test driven development (Foundations of web security) .

https://www.goodreads.com/book/show/3735293-clean-code

https://www.goodreads.com/book/show/387190.Test_Driven_Development

https://www.goodreads.com/book/show/128003.Foundations_of_Security

​

3) Study these concept:

Proper Error Handling/ Proper Input Validation/ DataBase Normalization.

Dynamic/Static Analysis

Fuzzing https://vuls.cert.org/confluence/display/tools/CERT+BFF+-+Basic+Fuzzing+Framework

4) Then now head deep into web security, which is really built over the topics on top..(web security books are the obvious/ mentioned in the above comments)

​

goodluck dude.

You could try to use a self-balancing binary search tree or some sort of hash table.

More info see below.

Self-balancing binary search tree

Hash-table

Implementing it as a hash table might be simpler if you've never done this before. I'd recommend reading a book on algorithms and data structures. Some resources follow.

The algorithm design manual

Algorithms by Sedgewick

Algorithms in C

Of course if you are not interested in the details you can use an existing library for this or some sort of database.

As well as The Algorithm Design Manual, there's the online Stony Brook Algorithm Repository managed by the author, which links to

implementations. Both have an excellent catalogue structure.The Algorithm Design Manual is worth a look.

If you're having problems understanding the Dijkstra's Algorithm for Shortest Paths in Graphs, you can check this link. It also has some pseudocode that might be helpful.

Also, here is a fine video lecture on shortest paths, by Steven Skiena, the author of The Algorithm Design Manual. By the way, this is an amazing book on algorithms that I recommend to everyone! It contains a wide variety of data structures and algorithms, and on the second part of the book, it has a humongous collection of problems (one pagers) with various ways/algorithms to solve them.

I'm currently running Skiena cover to cover...it's very good so far...

To me the best book I've found (so far) for understanding data structures is Steven Skiena's The Algorithm Design Manual.

Aside from the first part covering algorithm analysis, algorithm & data structures the second part is absolutely invaluable in finding (or at least narrowing down) the proper data structure/algorithm for solving a problem.

A CS degree is useful for a software engineer, but most of what you learn is only tangential to software engineering. Many of the best engineers are self taught.

That said, some of the basic stuff from CS is pretty useful. I'd definitely encourage you to learn data structures and algorithms. Just pick up a good textbook and go through it! (I like to recommend this one: https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena...).

Another suggestion I have is to seriously think about

whyyou want to do work in lower level stuff. The large majority of jobs are in web development right now, so trying to avoid that really limits your options. There's really nothing more sophisticated or interesting going on at the low levels. I've seen a lot of people come into a software engineering career with preconceptions about exactly what sort of work they want to do, and at the end of the day, I don't think those preconceptions have made any of them happy.https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena...

It's nearly a third of the length of CLRS, and half of Sedgwick. Much more precise, yet offers more in that it talks about common problem solving uses cases with data structures and algorithms, rather than writing going through the theoretical proofs behind them.

I've also heard

The Algorithm Design Manualrecommended, although I haven't read it and don't own a copy. http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/...http://www.amazon.co.uk/gp/product/1848000693/

https://www.amazon.com/Programming-Language-Brian-W-Kernigha...

I'd also learn SICP: https://www.amazon.com/Structure-Interpretation-Computer-Pro...

and algorithms from either CLRS https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press... or Skiena Algorithm Design https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena...