Pro/g/ramming Challenge!

"Continuing from Yesterday" - edition

RULES:

Pick a challenge between 0-99, do it as quickly as possible and make your code as small and efficient as you can in the language of your choosing. Post code when you're done!

And don't forget, Have fun!

Dijkstra's algorithm (at least 5 nodes)
Dafuq is that supposed to mean? dijkstra doesn't depend on the number of nodes.

From what I can tell, while the algorithm doesn't depend on the number of nodes, it's telling you to implement the algorithm with a non-arbitrary number of points to make sure it works properly...
But that's just my guess

Roll

What's 06 tornado?

Do we roll for it?

roll

I got a password generator. Fucking EZ.

You can if you want, but a while ago someone mentioned "rolling" is considered spam...

Just choose one that looks interesting

rollllinnnn

#!/bin/bash
echo "fizzbuzz"

Join my startup

What do you anons think should be the definitive version: 2.0 or 3.0? (I think I also have v1.4)

I personally like 2.0's difficulty levels, but enjoy 3.0's massive variety and info table near the end...

Thoughts?

rolling for

what do you think Sup Forumsuys
def check_pali(word):
w = word.replace(" ", "")
l = len(w)
l = l / 2 if l % 2 == 0 else (l - 1) / 2
p = [w[i] == w[len(w) - 1 - i] for i in range(int(l))]
return all(p)

w1 = "race car"
print(check_pali(w1))

Let's see 1.4

That being said, I vote for 2 because of the difficulty levels. 3 is overwhelming with variety. If it was sorted, it would probably be the winner

Here's 1.4(epsilon)... Don't really have much of an opinion for this as much as versions 2 or 3

C#. The difficult part was finding a big decimal library.

BigFloat pi = 0;
for (var i = 0; i

It's easier to read than 3

Roll

typedef struct { Node* next; void* data;} Node;

Rolling again

...

oh well, it wasn't so difficult
while true; do
TIME="/bin/date +%H:%M"
printf "\r$($TIME) "
sleep 1
printf "\r$($TIME)."
sleep 1
done

roll

rollu

Roll
I won't post results because I'm a faggot

#include
#include
int GetDate()
{
int months[] = {31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
int month, day, result;
std::cout

no thanks. Looks boring enough to skip. Reroll!

rolling

roll

rolllllllllor

Here is the one I use to use. I found it on an old USB with all my source code on it :D

We should make this a general.

Also, do any of the lists contain a Red Black Tree challenge? Had to do it for class, was pretty fun

Rowle

Coco bongo.

template
std::vector fit_in(std::vector A, T a) {

if (A[A.size() - 1] < a) {
A.push_back(a);
return A;
}

for (int i = 0; i < A.size(); i++) {
if (A[i] > a) {
A.insert(A.begin() + i, a);
break;
}
if (A[i] == a) {
return A;
}
}
return A;
}

template
std::vector sort(std::vector A) {

if (A.size() < 2)
return A;

std::vector alias;
alias.push_back(A[0]);

for (auto member : A) {
alias = fit_in(alias, member);
}

return alias;
}

template
int bin_search(std::vector A, T a) {

int puffer = 0;
while (true) {
int half = (int)((A.size()-1) / 2);
if (a < A[half]) {
A = std::vector(A.begin(), A.begin() + half);
}
else if (a > A[half]) {
puffer += half;
A = std::vector(A.begin() + half, A.end());
}
else {
return puffer + half;
}
}
return -1;
}


reroll

roll

OK roll
I haven't coded in a fucking month
About damn time

Fuck that rerolling

Trips speak truth

const int MAX = 1000000;
#include
#include
int main()
{
std::ofstream out("out.txt");
if(!out.is_open())
{
std::cout

roll

#include
int main()
{
int XYZ = 123;
std::cout

rolllorllllr

#include
#include
int main()
{
std::cout

Disgusting.

reroll

I agree the first one is not a generic algorithm, but what is wrong with the second one?

...

roll

bumpin'

rollan