13th Nov 2019, 2:20 PM
Piyush Srivastava
Piyush Srivastava - avatar
7 odpowiedzi
+ 2
Its still not working
14th Nov 2019, 3:04 PM
Piyush Srivastava
Piyush Srivastava - avatar
+ 1
In line 45 the line break is '\n', not '/n.'
13th Nov 2019, 2:47 PM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 1
Why is this printing 0 and not sort array
13th Nov 2019, 3:00 PM
Piyush Srivastava
Piyush Srivastava - avatar
+ 1
Your code is not repeating to check all elements. There is some logic mismatching in for loop.. So can explain what is shell sort?? In btw i wil check code ones.... edit: Piyush Srivastava in the for loop initialize k as k = j - gap not k=gap - j ; remove swap function declaration.. edit: ok. got it. You need just a few changes... Check this out... is this what you required code.. ? https://code.sololearn.com/cOVJ0jfQmzc9/?ref=app
14th Nov 2019, 3:14 PM
Jayakrishna 🇮🇳
0
Swap definition? or missing some header? I am not sure but look into it.
13th Nov 2019, 2:42 PM
Avinesh
Avinesh - avatar
0
Piyush Srivastava Swap function declaration mis matching, int should be like void swap( int x , int y); And actually it doesnot affect original value. So remove function write directly in else part.. if didnt work reply...
13th Nov 2019, 4:36 PM
Jayakrishna 🇮🇳
0
now its working.. Check this out... is this what you required code.. ? https://code.sololearn.com/cOVJ0jfQmzc9/?ref=app
14th Nov 2019, 3:22 PM
Jayakrishna 🇮🇳