Sponsored by HowLifeWorks
How to Make Your PC as Fast as the Day You Bought It view!
howlifeworks.com - What's the fastest way to restore a computer to its original blazing glory
48 Comments
- duality, on 10/12/2007, -7/+50Be nice, tokachu. If you actually paid attention, this is not some troll's poor grammar; this is simply a mistranslation from another language. Not every person on the planet uses English as their native tongue, and this article may have originally been written in the author's native tongue. (Another clue is that all the technical jargon is correctly translated.) So, how many natural languages do YOU speak?
As for the article, it seemed to encapsulate several chapters of my old Computer Science 2 textbook into a single page. It was definitely a good surface review for me. - jay314, on 10/12/2007, -0/+6This is an VERY poorly written article. Grammar aside, the author isn't even listing 5 algorithms. Just 5 random topics.
He lists: Sorting, Binary Search, Hashing, Dynamic Programming, and Search Algorithm. Binary Search is separate from Search Algorithm? And how is Dynamic Programming an algorithm? And he doesn't even mention actual algorithms for some of these categories.
And what audience is he targeting here? Someone who understands his comments of the Big-O classification of binary search should hardly need to be introduced to sorting algorithms.
Please bury this crap article. If you really want to learn something about algorithms, go to Amazon and search "algorithms". The first result (by Cormen) is a bit of heavy reading, but ought to cover most everything you'll ever need to know about them. Get it at your library. Or look for something a little lighter. Either way, this digg isn't going to teach you anything. - netant, on 10/12/2007, -0/+4VH1, go back to your channel. (and perhaps you too, ryebrye)
There is no reason to provide code or working examples. Its not a text book. Its a blog entry observation that there are 5 critical categories of algorithms, in the author's opinion. He is trying to persuade you to spend less time memorizing java or .NET apocrypha, and spend a little more attention on truly mastering basic concepts (algorithms).
More important, the whole idea of algorithms (methods of solving problems or repetitious tasks) is that they are INDEPENDENT of whatever language you use. You probably can apply the same algorithm with a totally wacko different language and platform twenty years from now, and still gain optimal efficiency.
I wasn't overly impressed the post. It seemed to be stating the "obvious", but it wouldn't be obvious to anyone who didn't take computer science classes in a good program (not a votech factory like DeVry). The irony is that the article is TOTALLY wasted for the audience its directed towards (vh1, ryebrye).
At least it gave me a nugget to go through; memoization. Don't remember that in my classes 20 years ago. In fact, back then, the class I took had a real hard-on for recursion, which I almost never use. My first instinct is still to find an iterative solution, even when the recursive one is straightforward. - tdyer, on 10/12/2007, -2/+5yes you could, but my code will beat the hell out of your piecemeal code anyday of the week.
- Cosmosis, on 10/12/2007, -0/+3Mirrored here.. no graphics from the host itself though (didn't get them in time) ;]
http://mirror.root.vc/www.idiotworld.com/story/258/5_algorithms_you_must_know.html
---
Want something mirrored? administrator@leetsauce.com. - r3tex, on 10/12/2007, -1/+4These "basic" sorting algorithms are almost always nicely built in to most languages. But before you can have "kickass algorithms", you need useful data-structures. Sorting an array is fun, but implementing a namecache tree takes quite a few steps ;) A good place to start is a data structures and algorithms book. You can't cheat your way to good programming.
- EEBaum, on 10/12/2007, -2/+5"Algorithms is underrated and probably underused"
wtf? An algorithm is a set of instructions that is executed to perform an action. They are everywhere. A computer program can't exist without them. They are neither underrated nor underused. - ketsugi, on 10/12/2007, -0/+2Good review; I can't remember any sort/search algos from my year 1 courses :/
- idiotlarry, on 10/12/2007, -2/+4You're right. This is going to be viewed as an excuse anyhow, but I meant it to sound something like "The subject of algorithms" and omitted the first part.. ah well!
- psylence, on 10/12/2007, -1/+3jrob: Please, PLEASE do learn it on line. We don't need any more competition in the job market.
- vh1`, on 10/12/2007, -1/+3I don't see a single mention of programming in the writeup
- jrob, on 10/12/2007, -1/+3though, it is cetainly possible to save thousands of dollars by learning the stuff online.
- SquirrelFucker, on 10/12/2007, -0/+2I'm with Jay on this one, these 5 algorithms are what you would learn in a first year course or in your starters programming book. If you are a programmer who is learning programming for future employment, these algorithms wouldn't be something you wouldn't know. Additionally, since no actual algorithms are given, it's not like the author is trying to give you an efficient and clean method for each.
- apoc06, on 10/12/2007, -0/+1there are algorithms meant not for just programming, but the article presents example ways to put algorithms to use in your daily life.
- inactive, on 10/12/2007, -1/+2I understand it's idiot world, but really people, go to school if you want to develop software, they will teach you all those algorithms and more.
- m85476585, on 10/12/2007, -0/+1I never knew you could cheat in 20 questions! Cool!
- emilng, on 10/12/2007, -0/+1Skip the article and read Code Complete
- schnitzi, on 10/12/2007, -0/+1>Yes, someone's going to point out you only need the last two numbers, so you can use a for loop.
Um, the nth Fibonacci number can be computed directly (without looping at all) as
F(n) = (P^n - (1-P)^n)/sqrt(5)
where P is the Golden Ratio. No digg, just for him not knowing that. - boredzo, on 10/12/2007, -0/+1BTW, the 100th Fibonacci number is 354224848179261915075. Took about a second on my 450 MHz G4 Cube using Landon Curt Null's 'calc' program (http://www.isthe.com/chongo/tech/comp/calc/ ). And that's including lots of printf statements.
- bpapa, on 10/12/2007, -0/+1What's your last name?
- idiotlarry, on 10/12/2007, -1/+1bpapa: if you went to Stony, then yes.. =)
- RRRobotHouse, on 10/12/2007, -1/+1Whatever, this guy is right. If you want to know how to implement some of these, pick up a copy of "Algorithms" by CLR.
- RyeBrye, on 10/12/2007, -6/+6This article is the crappiest article on programming I have ever seen dugg to the front page. He uses strange names for things, and has NO code on this page... just some bad english descriptions of algorithms...
My assesment of this article is that these are 5 algorithms that this guy DOESN'T understand that well, and thinks he should... and everyone else should as well... If he understood them, why doesn't he provide the pseudocode?
Wikipedia is a much better resource for basic algorithms than this... - balazs, on 10/12/2007, -3/+3dead link.
- ravi., on 10/12/2007, -4/+4things "we" must know from "idiotworld".com ?
- mennucc, on 10/12/2007, -0/+0here is a short python for the recursive computation
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
c0 = 1
c1 = 0
c2 = 0
lp = 0
while lp < 100 :
lp = 1
c2 = c1 c0
c0 = c1
c1 = c2
print lp, c2
^^^^^^^^^^^^^^^^^^^
(not that digg eats the indentation... you have to add it again in)
execution time is 0m0.095s
it makes me think that the upstream author is a moron - Grammarian, on 10/12/2007, -3/+3Someone set up us the algorithm.
Dugg, for great justice. - arcanearts101, on 10/12/2007, -0/+0Or look any of them up on Wikipedia.
- netant, on 10/12/2007, -1/+1psylence, you presume that any school has a good comp. sci. program. I definitely believe one can acquire a good to better grasp of material without spending time and money at an inferior college.
On the other hand, that inferior college will put out a chimp with a piece of paper, and many employers will prefer to hire the chimp. - rd1010, on 02/14/2009, -0/+0haha I agree.. its like "algorithm" is some magical word in silicon valley land
- bpapa, on 10/12/2007, -2/+1Actually now that I think of it I do remember one guy from my college named Larry. I only met him a couple of times, but I remember he was very active in an online community we had at school. And, he is probably a LOT frikkin smarter then the people who are commenting on this that are trashing him.
Wonder if it's the same guy though. - MrTea, on 10/12/2007, -3/+2Digg effect :(
- idiotlarry, on 10/12/2007, -5/+4luvkit: Expected value is not probability.. =)
- luvkit, on 10/12/2007, -6/+5All I can say is: "60% of the time it works... everytime!" "That doesn't make any sense."
- CaseyB, on 10/12/2007, -1/+0So true. I feel dumber for having read that article.
- idiotlarry, on 10/12/2007, -2/+1You're right, and it's on the site that was linked (I think). Just that *everyone* knows the Fib, so I save myself an explanation of the problem.. sorry for being lazy!
- rincebrain, on 10/12/2007, -3/+1Reported as lame, because the summary is inaccurate and the article contents is something you'll learn in intro programming courses.
- SuperBeast, on 10/12/2007, -5/+3nice link to "idiotworld" "idiot"larry
- tdyer, on 10/12/2007, -3/+1no.you certainly cant cheta your way to programming, and i think i use atleast one of those five algorithms in all my projects.
as for the idiots that dont know them...wtf? as for the bitches whining about pseudocode...yous hould be able to make your own. DP i wouldnt necessarily call an algo. but more of a class of algos. just as "Divide and conquer" is a class of algos. DP is essentially the opposite of divide and conquer.
as for a text, i would suggest: Kleinberg and Tardos. Algorithm Design, Addison-Wesley, 2005.
good read, good reference, and plenty of pseudocode for the babies. - idiotlarry, on 10/12/2007, -3/+1If that's how you feel, then the article's not for you.. =)
I've worked in the industry, and it still pains me to see co-workers use a linear array as a "cache" instead of either using a sorted array/tree or a hashtable. Pains me more that I have to recode it to make it efficient.
People know these algorithms, but they don't use it enough when they should. I could be wrong, it's just what I noticed.. - themachina, on 10/12/2007, -6/+4Confusing write-up + use of "paradigm" + bad link = no Digg.
Too bad, could have been cool. - bpapa, on 10/12/2007, -3/+1For some reason one of my old college's professors (Professor Skiena) is described in this article - the guy who tore up the phone books. Guess the author (larry?) went to my college.
- inactive, on 10/12/2007, -2/+0Inaccurate. I have absolutely no need to know these algorithms. Nor do the vast majority of human beings. So "must" makes it inaccurate.
- vann, on 10/12/2007, -4/+1So...what are the algorithms?
- tokachu, on 10/12/2007, -57/+51"Algorithms is underrated and probably underused"? Or in your case, proper English grammar is underrated and probably underused.
No digg, pal. - paOol, on 10/12/2007, -11/+5ok, this is lame.
- samstr, on 10/12/2007, -10/+2Seems to have been digg effected!
I'll bookmark the site for later
-------------------------------
http://www.wirah.com - KillerJ59J, on 10/12/2007, -31/+2xD Nice.


What is Digg?