algorytm-sortowania #3

Open
MateuszK wants to merge 2 commits from algorytm-sortowanie into master
MateuszK commented 5 years ago
Owner
There is no content yet.
MateuszK added 1 commit 5 years ago
Darek7D requested changes 5 years ago
static void Main(string[] args)
{
int[] sort = {21, 14, 1, 66, 45};
Poster
Collaborator

Proponuje zostawić tą linię, a resztę przenieść do funkcji void sortowanie() i przekazywać do niej tą tablicę sort.

Proponuje zostawić tą linię, a resztę przenieść do funkcji `void sortowanie()` i przekazywać do niej tą tablicę `sort`.
Darek7D marked this conversation as resolved
{
int[] sort = {21, 14, 1, 66, 45};
int length = 5;
Poster
Collaborator

Tutaj można zamiast '5' wpisać sort.Length.

Tutaj można zamiast '5' wpisać sort.Length.
Darek7D marked this conversation as resolved
int length = 5;
do
{
for(int i=0; i<4; i++)
Poster
Collaborator

Tutaj, zamiast '4' można wpisać length-1. Będzie bardzie uniwersalne.

Tutaj, zamiast '4' można wpisać length-1. Będzie bardzie uniwersalne.
Darek7D marked this conversation as resolved
length--;
}
while(length>1);
for(int j = 5 - 1; j >= 0; j--)
Poster
Collaborator

Tutaj też można użyć zmiennej length.
Ewentualnie wypisywać od początku a nie od końca, np.: for(int j = 0; j < length; j++)

Tutaj też można użyć zmiennej length. Ewentualnie wypisywać od początku a nie od końca, np.: `for(int j = 0; j < length; j++)`
MateuszK added 1 commit 5 years ago
Darek7D reviewed 5 years ago
length--;
}
while(length>1);
for(int j = length-1; j >= 0; j--)
Poster
Collaborator

Wypisywać wartości o początku a nie od końca.

Wypisywać wartości o początku a nie od końca.

Reviewers

Darek7D requested changes 5 years ago
This Pull Request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.