You have 10 seconds to prove that Jow Forums isn't all talk and that you can actually code...

You have 10 seconds to prove that Jow Forums isn't all talk and that you can actually code. Post a short single-reply implementation of your favorite algorithm using your favorite language that displays your prowess.

Attached: 1531430583386.jpg (349x306, 58K)

Do your own homework, faggot. weak bait.

10 seconds isn't enough to decide on what is my favorite algorithm

evil floating point bit level hacking

Attached: Kek.png (323x55, 1K)

int
parity(uint8_t b)
{
b ^= b >> 4;
b ^= b >> 2;
b ^= b >> 1;
b &= 1;
return b;
}

k maybe this

it's a meme you dipshit

print ("Hello world!")

GO FUCK YOURSELF YOU STUPID FUCKING KITTLE BITCH THANKS TO YOU AND YOUR BULLSHIT IM GOING TO BE STUCK WITH WINDOWS 10 FOREVER ALL BECAUSE YOU WANTED TO ACT LIKE A LITTLE CUNT FUCK YOU

interesting syntax, what language is this?

[code ]echo Hello, world! [/code]

Fuuuck yoooou acting calm when you are clearly not calm is something a fucking liar does I have every fucking right to be made clicking an update button should not subject me to broken shit Microsoft

echo "fuck off";

Iterative exponentiation in scheme, taking O(log(n)) time.
(define (fast-exp-iter b n)
(define (square n) (* n n))
(define (fast-exp-iter-internal base product count)
(cond ((= count 0) product)
((even? count) (fast-exp-iter-internal (square base)
product
(/ count 2)))
(else (fast-exp-iter-internal base
(* product base)
(- count 1)))))
(fast-exp-iter-internal b 1 n))

>return types on a separate line
Ewwww

that's the true patrician style, kiddo

I haven't written a line of code in 2 years

$variable=“I’m PHP developer, fuck algorithms”;
echo $variable;

I too have read the first chapter of sicp

cd code
ls
cd /code
code
ls code
cd code/code
ls

Attached: 1530058664467.jpg (883x1024, 485K)

inverting a binary tree
a = binary tree
temp = a.getLeftNode
a.getLeftNode = a.getRightNode
a.getRightNode = temp

[... document.querySelectorAll(`input[type="checkbox"]`)].forEach(element => element.addEventlistener(`click`, e => e.currentTarget.active = false));

Finding a node in an AVL tree
int find(struct avl_node_t **node, void *key, void *data, int (*ucmp)(void *, void *))
{
struct avl_node_t *temp;
temp = *node;

int compare;

if (temp)
{
compare = (*ucmp)(key, temp->key);

}

if (temp == NULL)
{
return -1;
}

else if (compare > 0)
{
find(&temp->right, key, NULL, ucmp);
}

else if (compare < 0)
{
find(&temp->left, key, NULL, ucmp);
}
else
{
printf("key = %s value = %s\n", (char *)temp->key, (char *)temp->value);
return 0;
}

//temp->height = height(temp);
//*node = temp;
//return 0; /* Compiler will complain that this return 0 needs to be here, but fuck the compiler*/
}

.currentTarget.checked = false*
Fuck.

imagine setting a getter

method overriding

Attached: image.jpg (350x237, 194K)

" Jow Forums is for the discussion of technology and related topics" Not only for programming.

print ("Hello World");

((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))

Attached: Lisp.png (604x600, 32K)

print("1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizzbuzz 16 17 fizz 19 buzz")

now fuck off

#include

int main() {

int i;

//for loop for counting from 1 to 100
for (i = 1; i

user@thinkpad~: vim kode.c
#include
int main()
{
if (OP==faggot)
{
printf("your gay\n");
}
}
:x
user@thinkpad~: clang kode.c; ./a.out > 4chin_post; cat 4chin_post
your gay
user@thinkpad~:

english i think

cd code
cd..
cd..
cd..
cd ..
ls
cd code
cd..
[\code]
Now fuck off

dumb faggot detected.

System.out.println("Hello World");

//Package diffiehellman implements diffie hellman key exchange algorithm
package diffiehellman

import (
"crypto/rand"
"math/big"
)

//PrivateKey generates a private key that satisfies pk > 1 && pk < p
func PrivateKey(p *big.Int) *big.Int {
rnd := rand.Reader
pk := new(big.Int)
for {
newp, err := rand.Int(rnd, p)
if err != nil {
continue
}
pk.Set(newp)
if pk.ProbablyPrime(12) && p.Cmp(pk) == 1 && pk.Cmp(big.NewInt(1)) == 1 {
return pk
}
}
}

func PublicKey(a, p *big.Int, g int64) *big.Int {
A := new(big.Int)
// A = g**a mod p
A.Exp(big.NewInt(g), a, p)
return A
}

func NewPair(p *big.Int, g int64) (*big.Int, *big.Int) {
privatekey := PrivateKey(p)
publickey := PublicKey(privatekey, p, g)
return privatekey, publickey
}

func SecretKey(a, B, p *big.Int) *big.Int {
sk := new(big.Int)
// s = B**a mod p
sk.Exp(B, a, p)
return sk
}