Hello! I am relatively new to Java (and love it!). I'm discovering that 'coding' is actually the easy part. Figuring out how to solve a particular problem is the 'thinking' part. Are there books or web-sites (I prefer free) of common or well-known algorithms and the problem they solve? For example, evaluating a leap year seems to be a popular one that is learned quickly when learning a new language. I'm sure there are others... how can I find them? Thanks! David Crossett
-nothing important to say, but learnin' plenty-
I used a book called "introduction to algorithms" in college. it give very generic solution to LOTS of common problems - from sorting to traversing to everything. http://www.amazon.com/exec/obidos/tg/detail/-/0262032937/qid=1067363073/sr=8-1/ref=sr_8_1/103-1044406-3503848?v=glance&n=507846 expensive, and VERY high level math stuff, but i still go back and re-read it every so often. It talks a lot about analyzing your data before trying to come up with "THE SOLUTION". example: i had a problem at work where it was taking a program DAYS to do something. i found it was using a Quicksort algorithm, on a HUGE file that was already sorted. Guess what? that's a bad idea. so i wrote a bubble sort (which is usually considered quite bad), and reduced performance time from 3 days to 2 hours.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad: