Skip to content

Instantly share code, notes, and snippets.

View pstachula-dev's full-sized avatar
👾

Paweł Stachula pstachula-dev

👾
View GitHub Profile
@pstachula-dev
pstachula-dev / gist:6498527
Last active December 22, 2015 16:19
SDiZO, lab2a (lista cykliczna)
#include <iostream>
#include <time.h>
// Lista cykliczna
using namespace std;
struct list_el
{
int key;
list_el *next;
@pstachula-dev
pstachula-dev / gist:6498555
Last active December 22, 2015 16:19
SDiZO, lab2b (lista dwukierunkowa)
#include <iostream>
#include <time.h>
using namespace std;
struct list_el
{
int key;
list_el *next;
list_el *prev;
@pstachula-dev
pstachula-dev / gist:6498572
Created September 9, 2013 17:06
SDiZO, lab2c (lista jednokierunkowa)
#include <iostream>
#include <time.h>
using namespace std;
struct list_el
{
int key;
list_el *next;
};
@pstachula-dev
pstachula-dev / gist:6498587
Last active December 22, 2015 16:19
SDiZO, lab3 Drzewo BST
#include<iostream>
#include <time.h>
using namespace std;
struct tree{
int key;
tree *left, *right;
};
tree *root;
class Binary_tree{
@pstachula-dev
pstachula-dev / gist:6498600
Created September 9, 2013 17:08
SDiZO, lab4 Drzewo DSW
#include<iostream>
#include<time.h>
#include<math.h>
using namespace std;
struct tree{
int key;
int vist_c;
tree *left, *right;
};
tree *root;
@pstachula-dev
pstachula-dev / gist:6498619
Created September 9, 2013 17:09
SDiZO, lab5 Drzewo DSW + Splay
#include<iostream>
#include<time.h>
#include<math.h>
using namespace std;
struct tree{
int key;
tree *left, *right;
};
tree *root;
@pstachula-dev
pstachula-dev / gist:6498633
Created September 9, 2013 17:10
SDiZO, lab5 Drzewo AVL (dodawanie)
#include<iostream>
#include<time.h>
#include<vector>
using namespace std;
int n;
struct drzewo{
int key,balance;
@pstachula-dev
pstachula-dev / gist:6498638
Created September 9, 2013 17:11
SDiZO, lab6 Drzewo AVL (usuwanie)
#include<iostream>
#include<time.h>
using namespace std;
struct avl_node
{
avl_node *left, *right, *p;
int key, bf;
};
class AVL
@pstachula-dev
pstachula-dev / gist:7290370
Last active December 27, 2015 07:39
Sandbox
#!/usr/bin/ruby
require 'timeout'
class Sandbox
def initialize(tar, time)
@tar = tar
@time = time
@path = get_main_folder_name
@app_map = {
require 'Benchmark'
class Sudoku
attr_accessor :puzzle
def initialize
@puzzle = ''
@game = Array.new(9)
@game.map! { Array.new(9) }
9.times do |i|