开发者

Which algorithms are worth to learn or recall on preparation to Java developer interview? [closed]

开发者 https://www.devze.com 2023-02-07 02:01 出处:网络
开发者_如何学JAVA 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 expertise, but this question will likely
开发者_如何学JAVA 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 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, visit the help center for guidance. Closed 12 years ago.

I know that is Collections.sort() method in Java but I think quicksort is worth to remember and try. My work target is general Java: web, database access, integration, not game developer, scientific application or another one that depends on advanced algorithms. Which algorithms should I learn to pass without stress Java developer interview?


Fizz Buzz

I usually don't care, if a developer knows the basic algorithms by heart. I do care, if he is capabale of understanding requirements and translating them in correct, testable and understandable pieces of code.

Ah, and I do care if he knows how to implement the most common design patterns. And he should know when and how to use collections, threads and - String#split - it's amazing how many "developers" don't know how to read and process a simple csv file.


Although I fully agree with Joachim comment, I would go for : collection selection. This is not an algorithm per se, but rather a good view of which collection is good for which purpose :

  • sorted content with constant lookup time ? TreeSet !
  • mapped data with memorization of insertion order ? LinkedHashMap !

using that, and some knowledge of design patterns behind collections, you will far too often reply to algorithms questions using the knuth answer (or the subtle variation : as long as Sun developpers implemented it correctly, I only have to choose wisely).

0

精彩评论

暂无评论...
验证码 换一张
取 消