r/compsci • u/TopcatTomki • Aug 14 '13
Algorithims Everyone Should Know?
What are some of you're favourite algoritms or concepts that you think everyone should know, whether they solve problems that crop up frequently, or are just beautiful in their construction?
379
Upvotes
View all comments
Show parent comment
0
u/monochr Aug 14 '13
If your language has a swap function you don't need the third variable either. C doesn't and if you want to add one it means yet more code to keep track of in headers.