// Remove um elemento int Remove(ref tp_fila f) { return(f.vetor[++f.inicio]); }
bool EstaCheia(tp_fila f) { return(f.fim == MAX - 1); }
// Insere um elemento void Insere(ref tp_fila f, int valor) { f.vetor[++f.fim] = valor; }
// Verificando limites bool EstaVazia(tp_fila f) { return(f.inicio == f.fim); }
tp_fila fila, filaNMe, filaNMa; // // Inicialização void Inicializa(ref tp_fila f) { f.inicio = f.fim = 1; f.vetor = new int[MAX]; }
int pico(ref tp_fila f) { return(f.vetor[f.inicio + 1]); //inicio começa de -1, mas o indice começa em 0 }
int tamanho(ref tp_fila f) { return(f.fim - f.inicio); }
// Insere um elemento void Insere(ref tp_fila f, string valor) { f.vetor[++f.fim] = valor; }