Skip to content

Instantly share code, notes, and snippets.

View senapk's full-sized avatar

David Sena Oliveira senapk

  • UFC
  • Fortaleza - CE
View GitHub Profile
#include <iostream>
using namespace std;
struct bnode{
int value;
bnode * left;
bnode * right;
bnode(int value = 0){
this->value = value;
#ifndef SCREEN_H
#define SCREEN_H
#include <vector>
#include <iostream>
#include <sstream>
namespace std{
class screen
@senapk
senapk / hashtable_interative.cpp
Last active May 31, 2016 21:20
Tabela Hash com Busca Linear e tratamento de colisão utilizando realocação.
#include <iostream>
#include <cstdio>
#include <time.h>
#include "screen.h"
using namespace std;
#ifndef HASHTABLE_H
#define HASHTABLE_H
@senapk
senapk / linked_list_recursive_double_pointer.cpp
Last active May 31, 2016 21:21
Lista ligada utilizando smart find com ponteiro duplo
#include <iostream>
using namespace std;
struct snode{
int value;
snode * next;
snode(int v = 0, snode * n = nullptr){
value = v;
next = n;
@senapk
senapk / bstree_usando_duplo_ponteiro.cpp
Last active May 31, 2016 21:21
Árvore binária de busca implementada utilizando duplo ponteiro.
#include <iostream>
using namespace std;
struct bnode {
int value;
bnode * left{nullptr};
bnode * right{nullptr};
bnode(int v){
value = v;
@senapk
senapk / btree_template.h
Last active May 31, 2016 21:24
Árvore binária genérica com template e iteradores
#ifndef BTREE_H
#define BTREE_H
#include <iostream>
using namespace std;
template <class T>
class bnode
{
@senapk
senapk / lista_elo.cpp
Created June 1, 2016 14:27
Lista ordenada sem cabeça utilizando a recursão com elo.
#include <iostream>
struct snode{
int value;
snode * next;
snode(int v = 0, snode * n = nullptr){
value = v;
next = n;
}
};
@senapk
senapk / bstree_elo.cpp
Created June 2, 2016 19:45
Arvore Binária de Busca com Elo sem smart find
#include <iostream>
using namespace std;
struct bnode{
int value;
bnode * left;
bnode * right;
bnode(int value = 0){
this->value = value;
Prova Manhã.
1. 3 Pontos
2. 3.5 Pontos
3. 3.5 Pontos
4. 2 Pontos.
1.
Hash.
Memória: Maior uso de memória por alocar toda a tabela de espaço.
Busca: tempo linear e constante, O(1), acesso direto por causa do hash.
@senapk
senapk / bubassauro.pro
Created August 18, 2016 13:02
FUP: Pulo da Pokebola
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
LIBS += -lsfml-graphics -lsfml-window -lsfml-system
SOURCES += main.cpp