Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Your favorite algorithm!

Name: Anonymous 2010-11-16 17:08

Dear /prog/,
As I know that all of you are [b][u]EXPERT PROGRIDERS[/b][/u], I'd like to know what your personally favorite algorithms are.
I'd pick Hirschberg's algorithm, although Needleman-Wunsch is fine but requires O(mn) instead of O(min{m,n})(Hirschberg).

So, what are your favorite algorithms?

Name: Anonymous 2010-11-16 17:09

bogosort

/thread

Name: Anonymous 2010-11-16 17:23

THE FIBONACCI BUTT SORT

Name: Anonymous 2010-11-16 18:49

Binary dicks tree

Name: Anonymous 2010-11-16 18:58

Dijkstra's Constant Search Algorithm

Name: Anonymous 2010-11-16 19:15

[/code]

  while (relaxing == true) {
    if (!high()) {
      rollupjoint();
    }
    smokejoint();
  }

[/code]

Name: !L33tUKZj5I 2010-11-16 19:26

ROT 13

Name: Anonymous 2010-11-16 19:34

Shor's algorithm, e n c r y p t i o n  b e  g o n e

Name: Anonymous 2010-11-16 20:18

>>6

while(true)
    if(!high())
        get_high();


FTFY

Name: Anonymous 2010-11-16 20:36

Quantum bogosort or takeMVar/putMVar, not sure which.

Name: Anonymous 2010-11-16 23:08

I am partial to Bresenham's, myself.

Name: Anonymous 2010-11-17 4:38

>>9
while (!get_high());

Name: Anonymous 2010-11-17 7:36

>>12
while (gethigh(),!high);
VALID C CODE

Name: Anonymous 2010-11-17 13:44

>>13
And that's why most awesome software ever created was done in C, kids

Name: Anonymous 2010-11-18 19:08

>>13
while(!high and gethigh());
VALID C++ CODE

Name: Anonymous 2010-11-18 20:54

I love the Taylor series

Name: Anonymous 2010-11-18 21:54

>>15
Valid C code. after including iso646.h

Name: Anonymous 2010-11-19 7:31

>>while(true)
[quote]while(true)[/quote]

for(;;) is superior.

Name: Anonymous 2010-11-19 7:38

wut

while(1) is hallowed by ye aulde traditione

why the devil do you prefer for(;;) ?

Name: Anonymous 2010-11-19 7:50

>>19
sufficiently stupid compilers may generate code that check if 1 is true.

Name: Anonymous 2010-11-19 7:56

>>19
for (;;) has more buddha power, considering while (1) specifies unnecessary data that needs to be optimized away by the compiler. For even more spiritual stability, you may define:

#define loop for (;;)

Name: Anonymous 2010-11-19 8:23

>>21
You can't do for(;;<code>) with that.

Name: Anonymous 2010-11-19 13:49

Clearly, for(;;) is superior if for no other reason than that it requires less typing than while(1).

Name: surveyist 2010-11-19 16:18


/* 1.
 */
for (;;) ;

/* 2. (faggot)
 */
while (1) ;

/* 3.
 */
loop: ; goto loop;

/* 4. (satori)
 */
do ; while (1);

Name: Anonymous 2010-11-19 16:27

; 5
(let loop ()
  (loop))

Name: Anonymous 2010-11-19 17:03

/* 6.
 */
int main(void)
{
    ;
    main();
}

Name: Anonymous 2010-11-19 17:19

>>26
recursion to the max

Name: Anonymous 2010-11-19 17:21

>>26
Careful with those semicolons, you know there was a shortage recently.

Name: Anonymous 2010-11-19 17:48

/* 7.
 */
while(1);
  loop:
    do goto
  loop;
while(1);

Name: Anonymous 2010-11-19 17:50

>>28
The semicolon is just a place-holder for the actual statement.

Name: Anonymous 2010-11-19 17:52

>>29
/* 7.
 */
while(1)
  loop:
    do goto
  loop;
while(1);

Name: Anonymous 2010-11-19 18:20

SYNTAX PREPROCESSOR (PRESENTED BY 4CHAN.ORG)
    while(1)
    {
        loop:
            do
            {
                goto loop;
            } while(1);
    }

Name: Anonymous 2010-11-19 19:06

for (;;while(1)) loop: while (1) goto loop;

Name: Anonymous 2010-11-19 19:20

>>33
error: expected expression before 'while'

Name: Anonymous 2010-11-19 19:53

Lol i just use high-order functions and external libraries, i don't program any algorithm other than the common if's, loops and other basic stuff those days. The most complex thing i do those days is write 2 nested loops.

That's the [code][b][i]ENTERPRISE[/i][/b][code] way. If it is too hard to solve, just download some code or buy some library.

Design a whole solution is more fun that designing algorithms, IMFO.

Name: Anonymous 2010-11-19 20:26

>>35
No, it's the MORONS way.
Or, at your choice, the SCRIPTKIDDIES way.

Name: Anonymous 2010-11-19 20:33

ALGORITHMS!

Name: Anonymous 2010-11-19 20:40

ALGORITHMS ARE FUCKING MADNESS!![/spoiler]

Name: Anonymous 2010-11-20 16:27

>>36 owned >>35 with his [b][i]BBCODE[/i][/b] skillz

Neverthless, I give 35 a point for trying: I was barely trolled

Name: Anonymous 2010-11-20 16:28

>>39
FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU.........

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List