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

Pages: 1-

School's out, time to program!

Name: Anonymous 2013-10-10 14:53

It's 2:45 PM, BITCHEs! East coast is best coast! My mother checked me out early today.

inb4 underage b&, I'm a senior in high school.

I'm going to finish writing my bubblesort implementation in piyton.

Name: le rage man 2013-10-10 15:17

FFFFFFFFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU

Name: Anonymous 2013-10-10 16:42

lol bubble sort
use a real sorting algorithm, like the

    FIBONACCI BUTT SORT

Name: Anonymous 2013-10-11 15:20

home from school again!!!

[bold]/prog/ is about to become awesome[/bold]

Name: Anonymous 2013-10-11 20:38

I finally completed my sorting algorithm! bubblesort went over my head so I decided to implement a different algo

a = [1, 2, 3, 4, 5]

while a != sorted(a):
    import random
    random.shuffle(a)

print(a)

My curfew is coming up so I must go

Name: Anonymous 2013-10-12 15:04

iM BACK MOTHERFUCKERS!

dID YOU MISS ME?

Name: Anonymous 2013-10-12 15:04

I'm back motherfuckers!

Did you miss me?

Name: Anonymous 2013-10-12 15:20

fun fact: bubblesort is exactly twice as fast as randomly swapping two random elements that are out of order until the array is sorted (is there a name for that kind of sort?)

Name: Anonymous 2013-10-12 17:40

>>5
>while a != sorted(a):
so you sort it in order to sort it? top lols

>>8
there must be, else how would they refer to it when they presented you this fact? btw where did you see it?
I tried coding it

function sort(x){
    while (!issorted(x)){
        var a1 = R(x.length);
        var a2 = R(x.length);
        if((a1<a2 && x[a1]>x[a2])||(a1>a2 && x[a1]<x[a2])){
            var temp=x[a1];
            x[a1]=x[a2];
            x[a2]=temp;
        }
    }
}

Name: Anonymous 2013-10-12 17:58

>>9
I optimized it

Check this out

import random
a = [1, 2, 3, 4, 5]
while a != sorted(a):
    random.shuffle(a)
print(a)

Only one import

Name: Anonymous 2013-10-12 18:47

CHECK'EM FAGGOTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Name: Anonymous 2013-10-12 19:46

>>9
I came up with it myself. Tested it against bubblesort and figured out that on average, bubblesort is twice as efficient.

Name: 12 2013-10-12 19:54

And by bubblesort I mean any sort that reorders two immediately following elements in whatever order (random, cocktail sort, etc), they're all the same for big arrays: O(N^2). So my anus-sort, as I will call it if there's no name for it, is O(2N^2).

Name: Anonymous 2013-10-12 20:34

bed time

good night

Name: Anonymous 2013-10-12 20:35

>>13
so it's not that bad huh

Name: Anonymous 2013-10-12 20:37

but if you just tested and figured that by the delay, you still might be wrong
there's a way to correctly find the complexity I think

Name: Anonymous 2013-10-13 15:22

Another glorious day on the textboards! Sorry for being late today guys.

Name: Anonymous 2013-10-14 15:28

Sup faggots! Did you get any work done while I was away?

Name: Anonymous 2013-10-14 21:46

bubble sort

Go to google.com
type in bubble sort + " programming language"
ctrl C
in text editor
ctrl V

Name: Anonymous 2013-10-15 15:46

It feels good to be home !

Name: Anonymous 2013-10-16 16:11

Got detention today, LOL

Name: Anonymous 2013-10-16 16:23

>>21
LOL why?

Name: Anonymous 2013-10-16 18:58

>>22
I got caught skipping class in the computer lab

Name: Anonymous 2013-10-16 20:55

>>23
haha should of hacked into your schedule and changed ur computer class to that period :P

Name: Anonymous 2013-10-17 23:15

good night faggots!!

Name: Anonymous 2013-10-17 23:35

>le pedophile underageb&

>>24
>le pedophile sage

Name: Anonymous 2013-10-18 3:01

>>26
Tsk.

Name: Anonymous 2013-10-18 10:01

>>27
>le pedophile tsk

Name: Anonymous 2013-10-18 12:43

>>28
Tsk.

Name: Anonymous 2013-10-18 17:34

>>29
>le pedophile tsk

Name: Anonymous 2013-10-18 22:20

bed time

Name: Anonymous 2013-10-19 9:13

Here is one practice :



using System;
using System.Collections.Generic;
using System.Text;

namespace ArrayExplained
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] rooms ={ 0, 0, 0, 0, 0 };
            Console.Write("Enter 1st room:");
            rooms[0] = int.Parse(Console.ReadLine());
            Console.Write("Enter 1st room:");
            rooms[1] = int.Parse(Console.ReadLine());
            Console.Write("Enter 1st room:");
            rooms[2] = int.Parse(Console.ReadLine());
            Console.Write("Enter 1st room:");
            rooms[3] = int.Parse(Console.ReadLine());
            Console.Write("Enter 1st room:");
            rooms[4] = int.Parse(Console.ReadLine());
 
        }
    }
}

Name: Anonymous 2013-10-19 16:45

GOOD DAY!

Name: Anonymous 2013-10-20 19:17

>>32
This is confusing, I don't know what you're trying to do

Name: Anonymous 2013-10-21 3:30

>>34

Go and learn C# and find out how to declare an array.

Name: Anonymous 2013-10-21 10:57

ENTERPRISE-LEVEL bubblesort

.orig x3000
    LD R0, ARRAY

    AND R6, R6, 0
LOOPA    AND R7, R7, 0
    ADD R7, R7, #1

    AND R1, R1, 0
    ADD R1, R1, #1
LOOPB    ADD R2, R7, #-1

    AND R5, R5, 0
    ADD R5, R0, R7
    LDR R3, R5, 0
    LDR R4, R5, #-1

    NOT R4, R4
    ADD R4, R4, #1

    ADD R1, R3, R4
    BRzp NOSWAP
   
    NOT R4, R4
    ADD R4, R4, #1
   
    STR R3, R5, #-1
    STR R4, R5, 0
    AND R1, R1, 0

NOSWAP    ADD R7, R7, #1
    LD R5, LENGTH
    NOT R5, R5
    ADD R5, R5, #1
    ADD R5, R5, R6
    ADD R5, R5, R7
    BRn LOOPB

    AND R1, R1, 0
    BRnp BREAK

    ADD R6, R6, #1
    LD R5, LENGTH
    NOT R5, R5
    ADD R5, R5, #1
    ADD R5, R5, R6
    BRn LOOPA
BREAK    HALT

ARRAY   .fill x6000
LENGTH  .fill 10
ANSWER  .fill 0
.end

.orig x6000
.fill 8
.fill 4
.fill 7
.fill 0
.fill -3
.fill 11
.fill 5
.fill 9
.fill 2
.fill 4
.end

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