Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am a self tought web developer and I have been developing websites using HTML/CSS/Javascript/jQuery/PHP/MySql for about one year and in about two months I will be moving to a new city to get my first job.

I have searched online and I found a perfect company for beginner developers and I kind of fit 90 percent of their needs except one that it seems is vital.

They require a working knowledge of algorithms and data structures.I never took the time to study algorithms so I think it is time to start. My only problem is that I don't know where to start and what algorithms I should learn.

What I would like to know is what type of algorithms are a must know for a web developer?

And also some recommendations for books that cover algorithms and data structures preferably written using PHP but if there are none I also know Java which was my first programming language.

share|improve this question

closed as not constructive by Walter, maple_shaft Aug 24 '12 at 14:33

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

5 Answers

You'd most likely be expected to know at least basic ones, as covered in the book "Introduction to Algorithms" by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein

enter image description here

share|improve this answer
1  
also algorithms are basically based on math, you better be good at math if you want to master algorithms in real life for useful stuff. – user827992 Aug 24 '12 at 14:27
That will melt his brain for sure – Paul Aug 24 '12 at 16:40
@Paul: probably, but at least he'll know what to expect ;-) – vartec Aug 26 '12 at 11:35

During the interview, they most likely won't ask about Web-specific algorithms and data structures. So you should brush up on general Algorithms. The Algorithm Design Manual is a good one, read the first section, chapters 1 through 10. For more thoughts on preparing for an interview, there are some good blog posts.

share|improve this answer

I'm a big fan of online courses, personally, and Udacity offers CS 215: Algorithms online, for free.

Since Udacity's CS101 is taught in Python, this course assumes a working knowledge, but if you've been programming in any language for some time, Python is trivial to pick up.

From the description:

By the end of this class you will understand key concepts needed to devise new algorithms for graphs and other important data structures and to evaluate the efficiency of these algorithms.

The emphasis is on graph data structures (I think the social graph emphasis is to make it interesting and relevant) but it's a solid introduction to algorithms and data structures.

Coursera also offers Stanford's Algorithms: Design and Analysis, Part 1 online for free, but the class date is TBD as of this posting.

share|improve this answer

In addition to the 2 books already mentioned you could also try Algorithms in Java by Robert Sedgewick. It should help you get a real grasp of them in a real programming language.

share|improve this answer
also try to do a search on google about google and facebook interviews with steven skienna or other google/facebook interviewers – paxRoman Aug 26 '12 at 10:01

Vartec is right about the CLR book. For interviews, focus on the following problem domains roughly in this order. The first few often show up in interviews, but the last few rarely show in interviews in my experience.

  1. Sorting
  2. Tree & Graph algorithms
  3. Hashing
  4. Heaps
  5. Compression
  6. Graph search
  7. Optimization

You also should know how algorithms are compared. Things like

  1. asymptotic bounds on memory and runtime
  2. definitions of tractability
  3. amortized vs worst-case performance

You should be able to identify classes of algorithms that are suitable to a problem. Know when

  1. Recursive approaches
  2. Dynamic programming approaches

are applicable and when they are not.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.