Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Alg2TB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fernando Erd
Alg2TB2
Commits
ae63dc92
Commit
ae63dc92
authored
9 years ago
by
Fernando Erd
Browse files
Options
Downloads
Patches
Plain Diff
Mandando arquivos que esqueci no ultimo commit
parent
141e62ee
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Arquivos/Estruturas.h
+1
-1
1 addition, 1 deletion
Arquivos/Estruturas.h
Arquivos/Loteria
+0
-0
0 additions, 0 deletions
Arquivos/Loteria
Arquivos/QuickSort.c
+5
-5
5 additions, 5 deletions
Arquivos/QuickSort.c
with
6 additions
and
6 deletions
Arquivos/Estruturas.h
+
1
−
1
View file @
ae63dc92
...
...
@@ -4,5 +4,5 @@
#include
<stdlib.h>
#include
<stdbool.h>
#include
<sys/time.h>
#define TAM
5
//tamanho do vetor
#define TAM
100
//tamanho do vetor
#define NUMMAX 10 //constante que tem o máximo de valores
This diff is collapsed.
Click to expand it.
Arquivos/Loteria
+
0
−
0
View file @
ae63dc92
No preview for this file type
This diff is collapsed.
Click to expand it.
Arquivos/QuickSort.c
+
5
−
5
View file @
ae63dc92
...
...
@@ -24,10 +24,11 @@ int Mediana (int Esquerda, int Meio, int Direita) {
}
int
Particao
(
int
Vetor
[],
int
Esquerda
,
int
Direita
)
{
int
Pivo
=
Mediana
(
Vetor
[
Esquerda
],
Vetor
[
Esquerda
+
Direita
/
2
+
1
],
Vetor
[
Direita
]);
int
i
=
(
Esquerda
-
1
);
int
Pivo
,
i
,
j
;
for
(
int
j
=
Esquerda
;
j
<=
Direita
-
1
;
j
++
)
Pivo
=
Vetor
[
Direita
];
i
=
(
Esquerda
-
1
);
for
(
j
=
Esquerda
;
j
<=
Direita
-
1
;
j
++
)
{
if
(
Vetor
[
j
]
<=
Pivo
)
{
...
...
@@ -36,7 +37,6 @@ int Particao (int Vetor[], int Esquerda, int Direita) {
}
}
Troca
(
Vetor
,
i
+
1
,
Direita
);
printVetor
(
Vetor
,
8
);
return
(
i
+
1
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment