Skip to content

Instantly share code, notes, and snippets.

@marcoscastro
Last active June 1, 2016 22:42
Show Gist options
  • Save marcoscastro/4b65b51cfb4cb391d758 to your computer and use it in GitHub Desktop.
Save marcoscastro/4b65b51cfb4cb391d758 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