Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save novasdream/0db4dff57d26f2ec26c74e0fc00f2331 to your computer and use it in GitHub Desktop.
Save novasdream/0db4dff57d26f2ec26c74e0fc00f2331 to your computer and use it in GitHub Desktop.
matriz esparsa - estrutura
/*
Estrutura célula contendo os seguintes campos:
- valor
- linha e coluna (posição da célula)
- ponteiro para o próximo elemento
- ponteiro para o elemento anterior
*/
typedef struct celula
{
int valor;
int lin, col;
struct celula *prox;
struct celula *ant;
} t_celula;
// variáveis globais
t_celula *primeiro; // primeiro elemento da lista
t_celula *ultimo; // último elemento da lista
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment