Skip to content

Instantly share code, notes, and snippets.

View Rag0n's full-sized avatar

Alexander Guschin Rag0n

View GitHub Profile
public final class LinkedList<T> {
public final class Node<T> {
public private(set) var value: T
public var next: Node?
public init(value: T) {
self.value = value
}
}
@Rag0n
Rag0n / FRP iOS Learning resources.md
Created December 18, 2015 13:55 — forked from JaviLorbada/FRP iOS Learning resources.md
The best FRP in iOS links.

Videos

@Rag0n
Rag0n / tmux-cheatsheet.markdown
Last active November 14, 2015 18:05 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
//
// main.c
// connected components
//
// Created by Александр on 08.05.2557 BE.
// Copyright (c) 2557 Alexander Guschin. All rights reserved.
//
#include <stdio.h>
//
// main.c
// acyclic test
//
// Created by Александр on 08.05.2557 BE.
// Copyright (c) 2557 Alexander Guschin. All rights reserved.
//
#include <stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
#include<string.h>
#include<math.h>
#define inf 0x7fffffff
int arr[200000];
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct node
{
int data;
struct node* next;
};
@Rag0n
Rag0n / heap
Created April 12, 2014 18:09
Binary heap
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int heap[1000000];
int size = 0;
int StrCompare(char *Str1,char *Str2)
{
@Rag0n
Rag0n / crc8
Last active May 30, 2018 18:24
crc8 C implementation
// c = t%(m+1)
// T - итоговая сумма, M - макс допустимое значение контрольной суммы
#include <stdio.h>
#define MAX 256
#define POLYNOMIAL 0x81
FILE *file;
unsigned char crc8(unsigned int len)
@Rag0n
Rag0n / huffman C implementation
Last active August 29, 2015 13:56
bwt[quicksort] + mtf + huffman
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
// #include <stdbool.h> // bool
#define BLOCKSIZE 5000
#define MAX_TREE_HT 100
// Преобразование Барроуза-Уиллера
// int f = 53; // колво символов в алфавите mtf
struct CharAndFreq