mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-13 07:25:42 +08:00
formatting source-code for 153fb7b8a5
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
void countSort(string arr)
|
||||
{
|
||||
void countSort(string arr) {
|
||||
string output;
|
||||
|
||||
int count[256], i;
|
||||
@@ -14,8 +13,7 @@ void countSort(string arr)
|
||||
|
||||
for (i = 1; i <= 256; ++i) count[i] += count[i - 1];
|
||||
|
||||
for (i = 0; arr[i]; ++i)
|
||||
{
|
||||
for (i = 0; arr[i]; ++i) {
|
||||
output[count[arr[i]] - 1] = arr[i];
|
||||
--count[arr[i]];
|
||||
}
|
||||
@@ -25,8 +23,7 @@ void countSort(string arr)
|
||||
cout << "Sorted character array is " << arr;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
string arr;
|
||||
cin >> arr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user