| Untrue (16) | |||
If the given list is 'a' 'c' 'd' 'e' then the user inputs 'b' @ position 3 (assume position-1) then it should sort to 'a' 'b' 'c' 'd' 'e' ignoring the position. The problem is that the character is only placed at the last index. Same happens if there is the same character existed.
God I need to sleep. | |||
|
Last edited on
|
|||
| Catfish3 (279) | ||
You also need to improve your otherwise atrocious style. Nothing personal. It's up to you to format your code so that it's readable. It's up to you to use L->A[j] and L->Last instead of (*L).A[j] and (*L).Last, which only clutter your code with parentheses.I could go on about why sensible usage of whitespaces and empty lines increases readability, but that's not what you're here for. So. What does Insert(x,newP,L); do?And how do you know that's not causing the problem instead? You also did not give your LIST structure's code. Knowing how your list looks on the inside helps people intuit your "plan". | ||
|
|
||