From 0dfdfef52f50c53d1ee26414825926b30a074042 Mon Sep 17 00:00:00 2001 From: Cleo Aguiar Date: Wed, 31 Jul 2019 13:28:03 -0300 Subject: [PATCH] update translation bucket-sort (#36529) * update translation bucket-sort removed extra space in code and added link in more information * refactored indentation space --- .../sorting-algorithms/bucket-sort/index.md | 40 ++++++++----------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/guide/portuguese/algorithms/sorting-algorithms/bucket-sort/index.md b/guide/portuguese/algorithms/sorting-algorithms/bucket-sort/index.md index 5fd5b050b1..3341dfad22 100644 --- a/guide/portuguese/algorithms/sorting-algorithms/bucket-sort/index.md +++ b/guide/portuguese/algorithms/sorting-algorithms/bucket-sort/index.md @@ -15,32 +15,26 @@ Vamos dar uma olhada mais de perto. Considere que é necessário criar uma matriz de listas, ou seja, de buckets. Os elementos agora precisam ser inseridos nesses buckets com base em suas propriedades. Cada um desses buckets pode ser classificado individualmente usando o Insertion Sort. ### Pseudocódigo para o tipo de balde: + ``` -void bucketSort(float[] a,int n) - - { - - for(each floating integer 'x' in n) - - { - - insert x into bucket[n*x]; - - } - - for(each bucket) - - { - - sort(bucket); - - } - - } +void bucketSort(float[] a,int n) +{ + for(each floating integer 'x' in n) + { + insert x into bucket[n*x]; + } + + for(each bucket) + { + sort(bucket); + } +} ``` ### Mais Informações: * [Wikipedia](https://en.wikipedia.org/wiki/Bucket_sort) - -* [GeeksForGeeks](http://www.geeksforgeeks.org/bucket-sort-2/) \ No newline at end of file + +* [GeeksForGeeks](http://www.geeksforgeeks.org/bucket-sort-2/) + +* [Hacker Earth](https://www.hackerearth.com/practice/algorithms/sorting/bucket-sort/tutorial/)