Algoritmos e Estruturas de Dados/Selection e Insertion: diferenças entre revisões

[edição verificada][revisão pendente]
Conteúdo apagado Conteúdo adicionado
He7d3r.bot (discussão | contribs)
Atualizando a categoria do livro, com AutoCat (detalhes). utilizando AWB
m <source> -> <syntaxhighlight> (phab:T237267)
Linha 47:
 
====[[Visual Basic]]====
<sourcesyntaxhighlight lang="vb">
Private Sub Ordenacao(Numeros() As Integer)
Dim i As Long
Linha 65:
End Sub
'Code By Kalandar
</syntaxhighlight>
</source>
 
====[[Linguagem de programação C|C]]====
<sourcesyntaxhighlight lang="c">
void insertionSort(int *primeiro, int *ultimo)
{
Linha 103:
}
}
</syntaxhighlight>
</source>
 
====[[Pascal]]====
<sourcesyntaxhighlight lang="pascal">
procedure InsertionSort(var a:vetor; n:integer; var NC, NT: integer);
var j,o:integer; {variaveis auxiliares}
Linha 123:
end;
end;
</syntaxhighlight>
</source>
 
====[[Python]]====
<sourcesyntaxhighlight lang="python">
def inssort(v):
for j in range(1, len(v)):
Linha 135:
i -= 1
v[i+1] = key
</syntaxhighlight>
</source>
 
====[[Haskell]]====
<sourcesyntaxhighlight lang="haskell">
import Data.List (insert)
 
insertsort :: Ord a => [a] -> [a]
insertsort = foldr insert []
</syntaxhighlight>
</source>
 
====[[C#]]====
<sourcesyntaxhighlight lang="csharp">
static int[] ordernar(int[] A)
{
Linha 163:
return A;
}
</syntaxhighlight>
</source>
 
====[[PHP]]====
<sourcesyntaxhighlight lang="php">
 
/**
Linha 203:
//Exibe a ordenação
print_r ($array);
</syntaxhighlight>
</source>
 
{{AutoCat}}