SlideShare a Scribd company logo
1 of 52
Download to read offline
LISTA SIMPLESMENTE
ENCADEADA – INSERIR DE
FORMA ORDENADA
Prof.ª M.ª Elaine Cecília Gatto
INSERINDO EM ORDEM CRESCENTE
void ordemCrescente(node *LISTA)
{
node *aux1 = LISTA;
node *aux2 = LISTA;
node *novo = aloca();
novo->prox = NULL;
while((aux2!=NULL) && (aux2-
>num < novo->num))
{
aux1 = aux2;
aux2 = aux2->prox;
}
if(aux1 == aux2)
{
novo->prox = aux1;
LISTA = novo;
}
else
{
novo->prox = aux1->prox;
aux1->prox = novo;
INSERINDO EM ORDEM CRESCENTE
AUX1
PRÓXIMO
AUX1
node *aux1 = LISTA;
NULLLista NULL
PRÓXIMO
LISTA
INSERINDO EM ORDEM CRESCENTE
node *aux1 = LISTA;
NULLLista NULL
PRÓXIMO
LISTA
AUX1
INSERINDO EM ORDEM CRESCENTE
AUX2
PRÓXIMO
AUX2
node *aux2 = LISTA;
NULLLista NULL
PRÓXIMO
LISTA
INSERINDO EM ORDEM CRESCENTE
node *aux2 = LISTA;
NULLLista NULL
PRÓXIMO
LISTA
AUX2
INSERINDO EM ORDEM CRESCENTE
10 NULL
PRÓXIMO
NOVO
node *novo = aloca();
novo->prox = NULL;
NULL
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
NULLLista NULL
PRÓXIMO
LISTA
AUX2
( Aux2 != null ) && (Aux2->num < novo->num )
( V ) && ( 0 < 10 ) = V && V = V
10 NULL
PRÓXIMO
NOVO
NULL
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
NULLLista NULL
PRÓXIMO
LISTA
AUX2
AUX1
PRÓXIMO
AUX1
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
NULLLista NULL
PRÓXIMO
LISTA
AUX1
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
NULLLista NULL
PRÓXIMO
LISTA AUX2
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
NULLLista NULL
PRÓXIMO
LISTA
AUX2
( Aux2 != null ) && (Aux2->num < novo->num )
( F ) && ( 0 < 10 ) = F && V = F
(Sai do while)
INSERINDO EM ORDEM CRESCENTE
if(aux1 == aux2)
{
novo->prox = aux1;
LISTA = novo;
}
( aux1 = aux 2)
F
NULLLista NULL
PRÓXIMO
LISTA
AUX2
NULLLista NULL
PRÓXIMO
LISTA
AUX1
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
LISTA = novo;
}
NULLLista NULL
PRÓXIMO
LISTA
AUX1
10 NULL
PRÓXIMO
NOVO
NULL
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
LISTA = novo;
}
NULLLista NULL
PRÓXIMO
LISTA
AUX1
10 NULL
PRÓXIMO
NOVO
NULL
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
LISTA = novo;
}
NULLLista NULL
PRÓXIMO
LISTA
AUX1
10 NULL
PRÓXIMO
NOVO
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
LISTA = novo;
}
NULLLista 0X90
PRÓXIMO
LISTA
AUX1
10 NULL
PRÓXIMO
NOVO
INSERINDO EM ORDEM CRESCENTE
Lista AX90
PRÓXIMO
10 AUX1
PRÓXIMO
INSERINDO EM ORDEM CRESCENTE
node *aux1 = LISTA;
Lista AX90
PRÓXIMO
10 AUX1
PRÓXIMO
AUX1
INSERINDO EM ORDEM CRESCENTE
node *aux2 = LISTA;
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX2
INSERINDO EM ORDEM CRESCENTE
node *novo = aloca();
novo->prox = NULL;
5 NULL
PRÓXIMO
NULL
NOVO (0X1B)
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX2
5 NULL
PRÓXIMO
NULL
NOVO (0X1B)
AX90
(Aux2 != NULL) && (Aux2 -> num < novo->num)
( V ) && ( 0 < 5 ) = V && ( V ) = V
(entra no while)
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX2
AX90
AUX1
PRÓXIMO
AUX1
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX1
AX90
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX2
AX90
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX2
AX90
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX2
AX90
(Aux2 != NULL) && (Aux2 -> num < novo->num)
( V ) && ( 10 < 5 ) = V && ( F ) = F
(sai do while)
5 NULL
PRÓXIMO
NULL
NOVO (0X1B)
INSERINDO EM ORDEM CRESCENTE
if(aux1 == aux2) {
novo->prox = aux1;
LISTA = novo;
}
( aux1 = aux 2)
F
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX1
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX2
AX90
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
aux1->prox = novo;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX1
5 NULL
PRÓXIMO
NOVO (0X1B)
AX90
NULL
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
aux1->prox = novo;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX1
5 AX90
PRÓXIMO
NOVO (0X1B)
AX90
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
aux1->prox = novo;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX1
5 AX90
PRÓXIMO
NOVO (0X1B)
AX90
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
aux1->prox = novo;
}
Lista AX90
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX1
5 AX90
PRÓXIMO
NOVO (0X1B)
AX90
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
aux1->prox = novo;
}
Lista 0X1B
PRÓXIMO
10 NULL
PRÓXIMO
NULL
AUX1
5 AX90
PRÓXIMO
NOVO (0X1B)
AX90
INSERINDO EM ORDEM CRESCENTE
Lista 0X1B
PRÓXIMO
10 NULL
PRÓXIMO
NULL5 AX90
PRÓXIMO
INSERINDO EM ORDEM CRESCENTE
node *aux1 = LISTA;
AUX1
Lista 0X1B
PRÓXIMO
10 NULL
PRÓXIMO
NULL5 AX90
PRÓXIMO
INSERINDO EM ORDEM CRESCENTE
node *aux2 = LISTA;
AUX2
Lista 0X1B
PRÓXIMO
10 NULL
PRÓXIMO
NULL5 AX90
PRÓXIMO
INSERINDO EM ORDEM CRESCENTE
node *novo = aloca();
novo->prox = NULL;
7 NULL
PRÓXIMO
NULL
NOVO (0X23)
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
7 NU
LL
NU
LL
(Aux2 != NULL) && (Aux2 -> num < novo->num)
( V ) && ( 0 < 7 ) = V && ( V ) = V
(entra no while)
0X23
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
(Aux2 != NULL) && (Aux2 -> num < novo->num)
( V ) && ( 5 < 7 ) = V && ( V ) = V
(entra no while)
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
INSERINDO EM ORDEM CRESCENTE
while((aux2!=NULL) && (aux2->num < novo->num)) {
aux1 = aux2;
aux2 = aux2->prox;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
(Aux2 != NULL) && (Aux2 -> num < novo->num)
( F ) && ( 10 < 7 ) = F && ( F ) = F
(sai do while)
INSERINDO EM ORDEM CRESCENTE
if(aux1 == aux2) {
novo->prox = aux1;
LISTA = novo;
}
( aux1 = aux 2)
F
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX2
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
aux1->prox = novo;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
7 NU
LL
NU
LL
0X23
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
aux1->prox = novo;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
7 0X9
0
0X23
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
aux1->prox = novo;
}
L 0X1
B 5 0X9
0 10
NU
LL
NU
LL
AUX1
7 0X9
0
0X23
INSERINDO EM ORDEM CRESCENTE
else {
novo->prox = aux1->prox;
aux1->prox = novo;
}
L 0X1
B 5 0X2
3 10
NU
LL
NU
LL
AUX1
7 0X9
0
0X23
INSERINDO EM ORDEM CRESCENTE
L 0X1
B 5 0X2
3
10
NU
LL
NU
LL7 0X9
0

More Related Content

What's hot

Operações em Árvores Binárias
Operações em Árvores BináriasOperações em Árvores Binárias
Operações em Árvores Bináriaselliando dias
 
YCMOU_FYBCA_DS_Unit-7.ppt
YCMOU_FYBCA_DS_Unit-7.pptYCMOU_FYBCA_DS_Unit-7.ppt
YCMOU_FYBCA_DS_Unit-7.pptsandeep54552
 
Polynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptxPolynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptxAlbin562191
 
Listas duplamente encadeadas
Listas duplamente encadeadasListas duplamente encadeadas
Listas duplamente encadeadasJailson Torquato
 
Como descobrir e classificar coisas usando machine learning sem compilcação
Como descobrir e classificar coisas usando machine learning sem compilcaçãoComo descobrir e classificar coisas usando machine learning sem compilcação
Como descobrir e classificar coisas usando machine learning sem compilcaçãoElaine Cecília Gatto
 
Estrutura de dados em Java - Filas com lista encadeada
Estrutura de dados em Java - Filas com lista encadeada Estrutura de dados em Java - Filas com lista encadeada
Estrutura de dados em Java - Filas com lista encadeada Adriano Teixeira de Souza
 
Lista duplamente encadeada em python
Lista duplamente encadeada em pythonLista duplamente encadeada em python
Lista duplamente encadeada em pythonCiro Rafael
 
Normalização - Alexandruk
Normalização - AlexandrukNormalização - Alexandruk
Normalização - AlexandrukHebert Alquimim
 
Python For Data Science Cheat Sheet
Python For Data Science Cheat SheetPython For Data Science Cheat Sheet
Python For Data Science Cheat SheetKarlijn Willems
 
Estrutura de Dados Aula 04 - Listas Estáticas
Estrutura de Dados Aula 04 - Listas EstáticasEstrutura de Dados Aula 04 - Listas Estáticas
Estrutura de Dados Aula 04 - Listas EstáticasLeinylson Fontinele
 
Materi linked list dan bubble sort
Materi linked list dan bubble sortMateri linked list dan bubble sort
Materi linked list dan bubble sortYunan Helmi Nasution
 
[Curso Java Basico - Orientacao a Objetos] Aula 35: Recursividade
[Curso Java Basico - Orientacao a Objetos] Aula 35: Recursividade[Curso Java Basico - Orientacao a Objetos] Aula 35: Recursividade
[Curso Java Basico - Orientacao a Objetos] Aula 35: RecursividadeLoiane Groner
 
Sql Objects And PL/SQL
Sql Objects And PL/SQLSql Objects And PL/SQL
Sql Objects And PL/SQLGary Myers
 

What's hot (20)

Operações em Árvores Binárias
Operações em Árvores BináriasOperações em Árvores Binárias
Operações em Árvores Binárias
 
YCMOU_FYBCA_DS_Unit-7.ppt
YCMOU_FYBCA_DS_Unit-7.pptYCMOU_FYBCA_DS_Unit-7.ppt
YCMOU_FYBCA_DS_Unit-7.ppt
 
Structure and pointer
Structure and pointerStructure and pointer
Structure and pointer
 
Polynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptxPolynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptx
 
Data structures
Data structuresData structures
Data structures
 
Listas duplamente encadeadas
Listas duplamente encadeadasListas duplamente encadeadas
Listas duplamente encadeadas
 
Como descobrir e classificar coisas usando machine learning sem compilcação
Como descobrir e classificar coisas usando machine learning sem compilcaçãoComo descobrir e classificar coisas usando machine learning sem compilcação
Como descobrir e classificar coisas usando machine learning sem compilcação
 
Sorting Methods.pptx
Sorting Methods.pptxSorting Methods.pptx
Sorting Methods.pptx
 
Linked list
Linked list Linked list
Linked list
 
Estrutura de dados em Java - Filas com lista encadeada
Estrutura de dados em Java - Filas com lista encadeada Estrutura de dados em Java - Filas com lista encadeada
Estrutura de dados em Java - Filas com lista encadeada
 
Lista duplamente encadeada em python
Lista duplamente encadeada em pythonLista duplamente encadeada em python
Lista duplamente encadeada em python
 
Normalização - Alexandruk
Normalização - AlexandrukNormalização - Alexandruk
Normalização - Alexandruk
 
Python For Data Science Cheat Sheet
Python For Data Science Cheat SheetPython For Data Science Cheat Sheet
Python For Data Science Cheat Sheet
 
Estrutura de Dados Aula 04 - Listas Estáticas
Estrutura de Dados Aula 04 - Listas EstáticasEstrutura de Dados Aula 04 - Listas Estáticas
Estrutura de Dados Aula 04 - Listas Estáticas
 
Stack, Queue, Linked List.pptx
Stack, Queue, Linked List.pptxStack, Queue, Linked List.pptx
Stack, Queue, Linked List.pptx
 
Link_List.pptx
Link_List.pptxLink_List.pptx
Link_List.pptx
 
Pilhas e Filas
Pilhas e FilasPilhas e Filas
Pilhas e Filas
 
Materi linked list dan bubble sort
Materi linked list dan bubble sortMateri linked list dan bubble sort
Materi linked list dan bubble sort
 
[Curso Java Basico - Orientacao a Objetos] Aula 35: Recursividade
[Curso Java Basico - Orientacao a Objetos] Aula 35: Recursividade[Curso Java Basico - Orientacao a Objetos] Aula 35: Recursividade
[Curso Java Basico - Orientacao a Objetos] Aula 35: Recursividade
 
Sql Objects And PL/SQL
Sql Objects And PL/SQLSql Objects And PL/SQL
Sql Objects And PL/SQL
 

More from Elaine Cecília Gatto

A influência da Tecnologia em cada faixa etaria
A influência da Tecnologia em cada faixa etariaA influência da Tecnologia em cada faixa etaria
A influência da Tecnologia em cada faixa etariaElaine Cecília Gatto
 
Inteligência Artificial Aplicada à Medicina
Inteligência Artificial Aplicada à MedicinaInteligência Artificial Aplicada à Medicina
Inteligência Artificial Aplicada à MedicinaElaine Cecília Gatto
 
Além do Aprendizado Local e Global: Particionando o espaço de classes em prob...
Além do Aprendizado Local e Global: Particionando o espaço de classes em prob...Além do Aprendizado Local e Global: Particionando o espaço de classes em prob...
Além do Aprendizado Local e Global: Particionando o espaço de classes em prob...Elaine Cecília Gatto
 
Apresentação da minha tese de doutorado no EPPC
Apresentação da minha tese de doutorado no EPPCApresentação da minha tese de doutorado no EPPC
Apresentação da minha tese de doutorado no EPPCElaine Cecília Gatto
 
Como a pesquisa científica impacta o mundo real.pptx
Como a pesquisa científica impacta o mundo real.pptxComo a pesquisa científica impacta o mundo real.pptx
Como a pesquisa científica impacta o mundo real.pptxElaine Cecília Gatto
 
Explorando correlações entre rótulos para o particionamento do espaço de rótu...
Explorando correlações entre rótulos para o particionamento do espaço de rótu...Explorando correlações entre rótulos para o particionamento do espaço de rótu...
Explorando correlações entre rótulos para o particionamento do espaço de rótu...Elaine Cecília Gatto
 
Community Detection for Multi-Label Classification - Seminários UFSCar
Community Detection for Multi-Label Classification - Seminários UFSCarCommunity Detection for Multi-Label Classification - Seminários UFSCar
Community Detection for Multi-Label Classification - Seminários UFSCarElaine Cecília Gatto
 
Classificação Multirrótulo: Aprendizado de Correlações
Classificação Multirrótulo: Aprendizado de CorrelaçõesClassificação Multirrótulo: Aprendizado de Correlações
Classificação Multirrótulo: Aprendizado de CorrelaçõesElaine Cecília Gatto
 
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...Elaine Cecília Gatto
 
Community Detection Method for Multi-Label Classification
Community Detection Method for Multi-Label ClassificationCommunity Detection Method for Multi-Label Classification
Community Detection Method for Multi-Label ClassificationElaine Cecília Gatto
 
Mulheres na Campus Party assumir o feminismo ou não – Blogueiras Feministas.pdf
Mulheres na Campus Party assumir o feminismo ou não – Blogueiras Feministas.pdfMulheres na Campus Party assumir o feminismo ou não – Blogueiras Feministas.pdf
Mulheres na Campus Party assumir o feminismo ou não – Blogueiras Feministas.pdfElaine Cecília Gatto
 
Explorando Correlações entre Rótulos usando Métodos de Detecção de Comu...
Explorando Correlações entre Rótulos usando Métodos de Detecção de Comu...Explorando Correlações entre Rótulos usando Métodos de Detecção de Comu...
Explorando Correlações entre Rótulos usando Métodos de Detecção de Comu...Elaine Cecília Gatto
 
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...Elaine Cecília Gatto
 
Pipeline desdobramento escalonamento
Pipeline desdobramento escalonamentoPipeline desdobramento escalonamento
Pipeline desdobramento escalonamentoElaine Cecília Gatto
 
Resumo das Instruções de Desvio Incondicionais MIPS 32 bits
Resumo das Instruções de Desvio Incondicionais MIPS 32 bitsResumo das Instruções de Desvio Incondicionais MIPS 32 bits
Resumo das Instruções de Desvio Incondicionais MIPS 32 bitsElaine Cecília Gatto
 
Exploring label correlations for partitioning the label space in multi label ...
Exploring label correlations for partitioning the label space in multi label ...Exploring label correlations for partitioning the label space in multi label ...
Exploring label correlations for partitioning the label space in multi label ...Elaine Cecília Gatto
 

More from Elaine Cecília Gatto (20)

A influência da Tecnologia em cada faixa etaria
A influência da Tecnologia em cada faixa etariaA influência da Tecnologia em cada faixa etaria
A influência da Tecnologia em cada faixa etaria
 
Inteligência Artificial Aplicada à Medicina
Inteligência Artificial Aplicada à MedicinaInteligência Artificial Aplicada à Medicina
Inteligência Artificial Aplicada à Medicina
 
Além do Aprendizado Local e Global: Particionando o espaço de classes em prob...
Além do Aprendizado Local e Global: Particionando o espaço de classes em prob...Além do Aprendizado Local e Global: Particionando o espaço de classes em prob...
Além do Aprendizado Local e Global: Particionando o espaço de classes em prob...
 
Apresentação da minha tese de doutorado no EPPC
Apresentação da minha tese de doutorado no EPPCApresentação da minha tese de doutorado no EPPC
Apresentação da minha tese de doutorado no EPPC
 
entrevista r7.pdf
entrevista r7.pdfentrevista r7.pdf
entrevista r7.pdf
 
Como a pesquisa científica impacta o mundo real.pptx
Como a pesquisa científica impacta o mundo real.pptxComo a pesquisa científica impacta o mundo real.pptx
Como a pesquisa científica impacta o mundo real.pptx
 
Empoderamento Feminino
Empoderamento FemininoEmpoderamento Feminino
Empoderamento Feminino
 
Explorando correlações entre rótulos para o particionamento do espaço de rótu...
Explorando correlações entre rótulos para o particionamento do espaço de rótu...Explorando correlações entre rótulos para o particionamento do espaço de rótu...
Explorando correlações entre rótulos para o particionamento do espaço de rótu...
 
Community Detection for Multi-Label Classification - Seminários UFSCar
Community Detection for Multi-Label Classification - Seminários UFSCarCommunity Detection for Multi-Label Classification - Seminários UFSCar
Community Detection for Multi-Label Classification - Seminários UFSCar
 
Classificação Multirrótulo: Aprendizado de Correlações
Classificação Multirrótulo: Aprendizado de CorrelaçõesClassificação Multirrótulo: Aprendizado de Correlações
Classificação Multirrótulo: Aprendizado de Correlações
 
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
 
Community Detection Method for Multi-Label Classification
Community Detection Method for Multi-Label ClassificationCommunity Detection Method for Multi-Label Classification
Community Detection Method for Multi-Label Classification
 
Mulheres na Campus Party assumir o feminismo ou não – Blogueiras Feministas.pdf
Mulheres na Campus Party assumir o feminismo ou não – Blogueiras Feministas.pdfMulheres na Campus Party assumir o feminismo ou não – Blogueiras Feministas.pdf
Mulheres na Campus Party assumir o feminismo ou não – Blogueiras Feministas.pdf
 
Curtinhas de sábado.pdf
Curtinhas de sábado.pdfCurtinhas de sábado.pdf
Curtinhas de sábado.pdf
 
Explorando Correlações entre Rótulos usando Métodos de Detecção de Comu...
Explorando Correlações entre Rótulos usando Métodos de Detecção de Comu...Explorando Correlações entre Rótulos usando Métodos de Detecção de Comu...
Explorando Correlações entre Rótulos usando Métodos de Detecção de Comu...
 
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
EXPLORANDO CORRELAÇÕES PARA O PARTICIONAMENTO DO ESPAÇO DE RÓTULOS EM PROBLEM...
 
Pipeline desdobramento escalonamento
Pipeline desdobramento escalonamentoPipeline desdobramento escalonamento
Pipeline desdobramento escalonamento
 
Cheat sheet Mips 32 bits
Cheat sheet Mips 32 bitsCheat sheet Mips 32 bits
Cheat sheet Mips 32 bits
 
Resumo das Instruções de Desvio Incondicionais MIPS 32 bits
Resumo das Instruções de Desvio Incondicionais MIPS 32 bitsResumo das Instruções de Desvio Incondicionais MIPS 32 bits
Resumo das Instruções de Desvio Incondicionais MIPS 32 bits
 
Exploring label correlations for partitioning the label space in multi label ...
Exploring label correlations for partitioning the label space in multi label ...Exploring label correlations for partitioning the label space in multi label ...
Exploring label correlations for partitioning the label space in multi label ...
 

Recently uploaded

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 

Recently uploaded (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 

Inserting nodes in sorted order in a simply linked list

  • 1. LISTA SIMPLESMENTE ENCADEADA – INSERIR DE FORMA ORDENADA Prof.ª M.ª Elaine Cecília Gatto
  • 2. INSERINDO EM ORDEM CRESCENTE void ordemCrescente(node *LISTA) { node *aux1 = LISTA; node *aux2 = LISTA; node *novo = aloca(); novo->prox = NULL; while((aux2!=NULL) && (aux2- >num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } if(aux1 == aux2) { novo->prox = aux1; LISTA = novo; } else { novo->prox = aux1->prox; aux1->prox = novo;
  • 3. INSERINDO EM ORDEM CRESCENTE AUX1 PRÓXIMO AUX1 node *aux1 = LISTA; NULLLista NULL PRÓXIMO LISTA
  • 4. INSERINDO EM ORDEM CRESCENTE node *aux1 = LISTA; NULLLista NULL PRÓXIMO LISTA AUX1
  • 5. INSERINDO EM ORDEM CRESCENTE AUX2 PRÓXIMO AUX2 node *aux2 = LISTA; NULLLista NULL PRÓXIMO LISTA
  • 6. INSERINDO EM ORDEM CRESCENTE node *aux2 = LISTA; NULLLista NULL PRÓXIMO LISTA AUX2
  • 7. INSERINDO EM ORDEM CRESCENTE 10 NULL PRÓXIMO NOVO node *novo = aloca(); novo->prox = NULL; NULL
  • 8. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } NULLLista NULL PRÓXIMO LISTA AUX2 ( Aux2 != null ) && (Aux2->num < novo->num ) ( V ) && ( 0 < 10 ) = V && V = V 10 NULL PRÓXIMO NOVO NULL
  • 9. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } NULLLista NULL PRÓXIMO LISTA AUX2 AUX1 PRÓXIMO AUX1
  • 10. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } NULLLista NULL PRÓXIMO LISTA AUX1
  • 11. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } NULLLista NULL PRÓXIMO LISTA AUX2
  • 12. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } NULLLista NULL PRÓXIMO LISTA AUX2 ( Aux2 != null ) && (Aux2->num < novo->num ) ( F ) && ( 0 < 10 ) = F && V = F (Sai do while)
  • 13. INSERINDO EM ORDEM CRESCENTE if(aux1 == aux2) { novo->prox = aux1; LISTA = novo; } ( aux1 = aux 2) F NULLLista NULL PRÓXIMO LISTA AUX2 NULLLista NULL PRÓXIMO LISTA AUX1
  • 14. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; LISTA = novo; } NULLLista NULL PRÓXIMO LISTA AUX1 10 NULL PRÓXIMO NOVO NULL
  • 15. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; LISTA = novo; } NULLLista NULL PRÓXIMO LISTA AUX1 10 NULL PRÓXIMO NOVO NULL
  • 16. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; LISTA = novo; } NULLLista NULL PRÓXIMO LISTA AUX1 10 NULL PRÓXIMO NOVO
  • 17. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; LISTA = novo; } NULLLista 0X90 PRÓXIMO LISTA AUX1 10 NULL PRÓXIMO NOVO
  • 18. INSERINDO EM ORDEM CRESCENTE Lista AX90 PRÓXIMO 10 AUX1 PRÓXIMO
  • 19. INSERINDO EM ORDEM CRESCENTE node *aux1 = LISTA; Lista AX90 PRÓXIMO 10 AUX1 PRÓXIMO AUX1
  • 20. INSERINDO EM ORDEM CRESCENTE node *aux2 = LISTA; Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX2
  • 21. INSERINDO EM ORDEM CRESCENTE node *novo = aloca(); novo->prox = NULL; 5 NULL PRÓXIMO NULL NOVO (0X1B)
  • 22. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX2 5 NULL PRÓXIMO NULL NOVO (0X1B) AX90 (Aux2 != NULL) && (Aux2 -> num < novo->num) ( V ) && ( 0 < 5 ) = V && ( V ) = V (entra no while)
  • 23. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX2 AX90 AUX1 PRÓXIMO AUX1
  • 24. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX1 AX90
  • 25. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX2 AX90
  • 26. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX2 AX90
  • 27. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX2 AX90 (Aux2 != NULL) && (Aux2 -> num < novo->num) ( V ) && ( 10 < 5 ) = V && ( F ) = F (sai do while) 5 NULL PRÓXIMO NULL NOVO (0X1B)
  • 28. INSERINDO EM ORDEM CRESCENTE if(aux1 == aux2) { novo->prox = aux1; LISTA = novo; } ( aux1 = aux 2) F Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX1 Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX2 AX90
  • 29. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; aux1->prox = novo; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX1 5 NULL PRÓXIMO NOVO (0X1B) AX90 NULL
  • 30. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; aux1->prox = novo; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX1 5 AX90 PRÓXIMO NOVO (0X1B) AX90
  • 31. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; aux1->prox = novo; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX1 5 AX90 PRÓXIMO NOVO (0X1B) AX90
  • 32. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; aux1->prox = novo; } Lista AX90 PRÓXIMO 10 NULL PRÓXIMO NULL AUX1 5 AX90 PRÓXIMO NOVO (0X1B) AX90
  • 33. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; aux1->prox = novo; } Lista 0X1B PRÓXIMO 10 NULL PRÓXIMO NULL AUX1 5 AX90 PRÓXIMO NOVO (0X1B) AX90
  • 34. INSERINDO EM ORDEM CRESCENTE Lista 0X1B PRÓXIMO 10 NULL PRÓXIMO NULL5 AX90 PRÓXIMO
  • 35. INSERINDO EM ORDEM CRESCENTE node *aux1 = LISTA; AUX1 Lista 0X1B PRÓXIMO 10 NULL PRÓXIMO NULL5 AX90 PRÓXIMO
  • 36. INSERINDO EM ORDEM CRESCENTE node *aux2 = LISTA; AUX2 Lista 0X1B PRÓXIMO 10 NULL PRÓXIMO NULL5 AX90 PRÓXIMO
  • 37. INSERINDO EM ORDEM CRESCENTE node *novo = aloca(); novo->prox = NULL; 7 NULL PRÓXIMO NULL NOVO (0X23)
  • 38. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } 7 NU LL NU LL (Aux2 != NULL) && (Aux2 -> num < novo->num) ( V ) && ( 0 < 7 ) = V && ( V ) = V (entra no while) 0X23 L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2
  • 39. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2 L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1
  • 40. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2 L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1
  • 41. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2 L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1
  • 42. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2 (Aux2 != NULL) && (Aux2 -> num < novo->num) ( V ) && ( 5 < 7 ) = V && ( V ) = V (entra no while)
  • 43. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2 L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1
  • 44. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2 L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1
  • 45. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2 L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1
  • 46. INSERINDO EM ORDEM CRESCENTE while((aux2!=NULL) && (aux2->num < novo->num)) { aux1 = aux2; aux2 = aux2->prox; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2 (Aux2 != NULL) && (Aux2 -> num < novo->num) ( F ) && ( 10 < 7 ) = F && ( F ) = F (sai do while)
  • 47. INSERINDO EM ORDEM CRESCENTE if(aux1 == aux2) { novo->prox = aux1; LISTA = novo; } ( aux1 = aux 2) F L 0X1 B 5 0X9 0 10 NU LL NU LL AUX2 L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1
  • 48. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; aux1->prox = novo; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1 7 NU LL NU LL 0X23
  • 49. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; aux1->prox = novo; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1 7 0X9 0 0X23
  • 50. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; aux1->prox = novo; } L 0X1 B 5 0X9 0 10 NU LL NU LL AUX1 7 0X9 0 0X23
  • 51. INSERINDO EM ORDEM CRESCENTE else { novo->prox = aux1->prox; aux1->prox = novo; } L 0X1 B 5 0X2 3 10 NU LL NU LL AUX1 7 0X9 0 0X23
  • 52. INSERINDO EM ORDEM CRESCENTE L 0X1 B 5 0X2 3 10 NU LL NU LL7 0X9 0