This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tabela Hash sem tratamento de colisões | |
# Criado por: profa. Divani Barbosa Gavinier | |
# Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
# divanibarbosa@gmail.com | |
class Hash: | |
def __init__(self,tam): | |
self.tab = {} | |
self.tam_max = tam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Criado por: profa. Divani Barbosa Gavinier | |
# Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
# divanibarbosa@gmail.com | |
class HashLinearColisao: | |
def __init__(self,tam): | |
self.tab = {} | |
self.tam_max = tam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Criado por: profa. Divani Barbosa Gavinier | |
# Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
# divanibarbosa@gmail.com | |
class Lista: | |
def __init__(self): | |
self.lista=[] | |
def vazio(self): #verifica se lista está vazia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Criado por: profa. Divani Barbosa Gavinier | |
# Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
# divanibarbosa@gmail.com | |
class Vetor: | |
def __init__(self): | |
self.vetor = [] | |
self.n = 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Criado por: profa. Divani Barbosa Gavinier | |
# Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
# divanibarbosa@gmail.com | |
def size(fila): #retorna tamanho da fila | |
return len(fila) | |
def empty(fila): #verifica se fila está vazia | |
return len(fila) == 0 | |
def enqueue(fila,item): #adiciona itens na fila | |
fila.append(item) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Criado por: profa. Divani Barbosa Gavinier | |
# Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
# divanibarbosa@gmail.com | |
def empty(pilha): #verifica se pilha está vazia | |
return len(pilha) == 0 | |
def push(pilha,item): #adiciona itens na pilha | |
pilha.append(item) | |
def pop(pilha): #remove itens da pilha | |
if empty(pilha): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tabela HASH com tratamento de colisões linear | |
// Criado por: profa. Divani Barbosa Gavinier | |
// Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
// divanibarbosa@gmail.com | |
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
struct HASH { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tabela HASH com tratamento de colisões do tipo lista | |
// Criado por: profa. Divani Barbosa Gavinier | |
// Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
// divanibarbosa@gmail.com | |
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
//////////////////////////////////////////////// | |
struct NO { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Arvore Binária em C++ usando Classe | |
// Criado por: profa. Divani Barbosa Gavinier | |
// Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
// divanibarbosa@gmail.com | |
//////////////////////////////////////////////// | |
#include <iostream> | |
#include <stdlib.h> | |
using namespace std; | |
//////////////////////////////////////////////// | |
struct NO { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HeapSort em C++ usando Classe | |
// Criado por: profa. Divani Barbosa Gavinier | |
// Curriculo Lattes: http://lattes.cnpq.br/8503400830635447 | |
// divanibarbosa@gmail.com | |
#include <iostream> | |
using namespace std; | |
class Heap { | |
private: int *vHeap, tam_max, n; | |