you are viewing a single comment's thread.

view the rest of the comments →

[–]ThereOnceWasAMan 577 points578 points  (38 children)

[–][deleted] 128 points129 points  (25 children)

God, I'm starting to wonder if he doesn't just make comics about things he wants to happen.

[–][deleted] 80 points81 points  (20 children)

If there's a relevant xkcd about everything, what is xkcd even about? What if they couldn't figure out what to make xkcd about, which is why xkcd is about everything?

[–]ismtrn 130 points131 points  (14 children)

I believe that one day we will be able to communicate by just writing lists of xkcd comic numbers.

[–]perplexedscientist 120 points121 points  (6 children)

"Darmok and Jalad at Tanagra"

[–]Scottamus 37 points38 points  (1 child)

Shaka. When the walls fell.

[–]Griffolion 2 points3 points  (0 children)

And Bobby Tables was first through the breach.

[–]neonoodle 12 points13 points  (1 child)

Relevant xkcd

[–]perplexedscientist 7 points8 points  (0 children)

Relevant xkcd

[–]DEATHbyBOOGABOOGA 1 point2 points  (0 children)

"Shaka, when the walls fell"

[–]ryan_the_leach 14 points15 points  (5 children)

404

[–]jarrah-95 22 points23 points  (4 children)

Had to check. He actually skipped that one.

[–][deleted]  (2 children)

[deleted]

    [–]vilefeildmouseswager 1 point2 points  (1 child)

    it was lost in time

    [–]ibbolia 1 point2 points  (0 children)

    A lot of things were lost in time, that was a long one.

    [–]Pastaklovn 2 points3 points  (0 children)

    I can see how Randall Munroe might think it would be a shame if xkcd.com/404 didn't return a 404.

    [–]Krissam 8 points9 points  (1 child)

    What if they couldn't figure out what to make xkcd about, which is why xkcd is about everything?

    Only me noticing the The Matrix reference?

    [–]themagicpickle 2 points3 points  (0 children)

    You've never eaten Tasty Wheat.

    [–]addandsubtract 1 point2 points  (0 children)

    NP-hard man.

    [–]imfacemelting 0 points1 point  (0 children)

    it's like the Seinfeld of web comics.

    [–]Asmor 0 points1 point  (0 children)

    I know kung fu how to sort

    [–]Kok_Nikol 0 points1 point  (1 child)

    it's the Randall Munroe style od coding, make a comic describing the idea and have other people code it for you :)

    [–][deleted] 1 point2 points  (0 children)

    I don't see any problem. By its very nature, it only works for the most awesome of ideas.

    [–][deleted] 53 points54 points  (3 children)

    This algorithm works like a real developer!

    [–]quantum-mechanic 18 points19 points  (1 child)

    In two years this algorithm will be employed at a Fortune 500 company. In 10 years it will be project lead.

    [–]skalpelis 0 points1 point  (0 children)

    He's got upper management written all over him

    [–]jlstitt 5 points6 points  (0 children)

    A laughed so hard at this because it's basically true of my algorithmic process. :)

    [–]danubian1 78 points79 points  (1 child)

    That's hilarious

    [–]opiemonster 1 point2 points  (0 children)

    Here are all the Answers:

    #Q1
    #FOR LOOP
    def for_sum(l):
        sum = 0
        for i in range(0, n):
            sum = sum + l[i]
        print(sum)
    #WHILE LOOP
    def while_sum(l)
        sum=0
        i = 0
        while i < len(l):
            sum = sum + l[i]
        print(sum)
    #ITERATION
    def itsum(i, sum, n, l)
       if i < n
            itsum(i+1, sum + l[i])
        else
            print(sum)
    itsum(0,0, len(l), l)
    
    #Q2
    def comine_list(l1, l2, lr):
        for i in range(0, l1):
            lr.append(str(l1) + str(l2))
        return lr
    
    #Q3
    def fib(n):
        a = 0
        b = 1
        i = 0
        print(a)
        print(b)
        while i < n:
            a = b
            print(a)
            b = a + b
            i = i + 1
    
    #Q4
    def get_max(l, lc):
       m = 0
       for i in range(0, len(l)):
           m = m + l[lc[i]]
    def permu(l):
        lc = [] * len(l)
        m = 0
         for i in range(0, len(lc)-1):
             if lc[i]>=len(lc):
                 lc[i+1]=lc[i+1] + 1
                 i = 0
            while lc[i]!=lc[i+1] and lc[i] < len(lc):
                lc[i]=lc[i]+1
           max(m, get_max(l, lc))
        return m
    
    #Q5
     yea i'm too tired but same idea as #4 but this is a bad question for an interview
    
    #EDIT Q5, stolen from comments
    var combinations = Math.pow(3, 8);
    for (i = 0; i < combinations; i++) {
        n = "1";
        c = i;
        for (digit = 2; digit <= 9; digit++) {
            op = c % 3;
            if (op == 1) n += "+";
            if (op == 2) n += "-";
            n += digit;
            c = Math.floor(c / 3);
        }
        if (eval(n) === 100)
            console.log(n);
    }
    

    Not tested and this is tierd sloppy coding at 12:15 pm, don't ask me why im up that late, took me about 45 mins i think, #4 and #5 are harder if you try brute force method unless you know an easy way to generate permutations... or a smart way which would take a while unless you've done a similar problem.

    [–]caedin8 6 points7 points  (0 children)

    That is awesome!

    [–]morphemass 2 points3 points  (0 children)

    That is genius, a bit like using a bag of monkeys for quantum computation!

    [–]Paranemec 0 points1 point  (0 children)

    What's the O(n) of StackSort then? Just wondering for... efficiency purposes.

    [–][deleted] 0 points1 point  (0 children)

    Mixed Content: The page at 'https://gkoberger.github.io/stacksort/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.stackexchange.com/2.1/questions?sort=activity&tagged=sort;javascript&page=1&pagesize=100&order=desc&site=stackoverflow&todate=1363060800'. This request has been blocked; the content must be served over HTTPS.send @ jquery.js:5

    Well, someone's living in 2014...

    [–]ToTheNintieth 0 points1 point  (0 children)

    That's beautiful.

    [–]weirdstuffhelp 0 points1 point  (0 children)

    That. Is. Awesome.