[ rss / options / help ]
post ]
[ b / iq / g / zoo ] [ e / news / lab ] [ v / nom / pol / eco / emo / 101 / shed ]
[ art / A / beat / boo / com / fat / job / lit / map / mph / poof / £$€¥ / spo / uhu / uni / x / y ] [ * | sfw | o ]
logo
technology

Return ]

Posting mode: Reply
Reply ]
Subject   (reply to 27570)
Message
File  []
close
3balls.jpg
275702757027570
>> No. 27570 Anonymous
17th August 2020
Monday 1:19 pm
27570 http://algorithmsilluminated.org/datasets/problem3.5.txt
How many inversions does this list of numbers have?

(Warning: large list, 100,000 numbers)

My code says 2,407,905,288

>Wat is inversion?

>The number of pairs (i, j) of array indices with i<j and A[i] >A[j]

An asc-sorted list has no inversions, a dsc-sorted list has n(n-1)/2 inversions.
Expand all images.
>> No. 27571 Anonymous
17th August 2020
Monday 6:45 pm
27571 spacer
>>27570
Do your own homework.
>> No. 27572 Anonymous
17th August 2020
Monday 7:48 pm
27572 spacer
>>27571

I've done it, I just want to check the answer. Roughgarden doesn't give the answer on his site.
>> No. 27573 Anonymous
17th August 2020
Monday 7:50 pm
27573 spacer

Roughgarden trollface.jpg
275732757327573
>>27572
>Roughgarden doesn't give the answer on his site
>> No. 27574 Anonymous
17th August 2020
Monday 9:03 pm
27574 spacer
And here's me thinking mutilation-lad had finally provided pictures.
>> No. 27575 Anonymous
17th August 2020
Monday 9:47 pm
27575 spacer
>>27574

wat?
>> No. 27576 Anonymous
17th August 2020
Monday 10:31 pm
27576 spacer
>>27575
See >>/emo/29163
>> No. 27577 Anonymous
17th August 2020
Monday 11:10 pm
27577 spacer
>>27576

Oh, I remember now. I'm still developing the circumcision ring.
>> No. 27578 Anonymous
18th August 2020
Tuesday 8:49 am
27578 spacer
>>27577

Surely just use a cigar cutter?
>> No. 27579 Anonymous
18th August 2020
Tuesday 9:51 am
27579 spacer

heap.jpg
275792757927579
>>27577>>27578

Is this some sort of reference to me not being married?
>> No. 27581 Anonymous
19th August 2020
Wednesday 12:42 pm
27581 spacer
>>27579
That sketch is forever seared into my mind.

Return ]
whiteline

Delete Post []
Password