Skip to content

Instantly share code, notes, and snippets.

View r41d's full-sized avatar

Lennart Buhl r41d

View GitHub Profile
@r41d
r41d / sl.c
Created February 7, 2016 11:30
stripped version of SL 5.02 in one file without any arguments or special features
/*========================================
* sl.c: SL version 5.02 - stripped
* Copyright 1993,1998,2014
* Toyoda Masashi
* ([email protected])
* Last Modified: 2014/06/03
*========================================
*/
#define D51HEIGHT 9
# original XML at http://www.w3.org/Math/characters/unicode.xml
# XSL for conversion: https://gist.github.com/798546
unicode_to_latex = {
u"\u0020": "\\space ",
u"\u0023": "\\#",
u"\u0024": "\\textdollar ",
u"\u0025": "\\%",
u"\u0026": "\\&",
@r41d
r41d / gist:7189710
Last active December 26, 2015 17:49
import java.util.*;
import java.io.*;
class Sorting {
static int vgl = 0;
static int inversionen = 0;
static boolean lt(int x, int y){vgl++; return x < y;}
static boolean le(int x, int y){vgl++; return x <= y;}
static boolean ge(int x, int y){vgl++; return x >= y;}
static boolean gt(int x, int y){vgl++; return x > y;}