send me a code of LL-K reverse
LL - K reverse in linked list
Check this:
If unable to understand, do let me know
https://ide.codingblocks.com/s/411432 - this is my code insertion sort in linked list, can you help me in this also , i amgetting segmentation fault,
You have recently posted a doubt for the same which other TA has acknowledged. Wait for his/her response. If you didn’t get any response then let me know. Will help you accordingly.
how we do , recursively LL-K
https://ide.codingblocks.com/s/411432 - this is my code insertion sort in linked list, can you help me in this also , i amgetting segmentation fault,
please yr help me in this code, he/she is not replying it’s been 4 hours.
The code i have share with you is by doing recursion only.
Bro i can surely help you with it. But it will be counted in that TA’s contribution. Go in chat with TA option. See there will be a name of TA in it. You can mention that TA in your doubt thread. Or you can reopen your doubt too. If he or she is not responding to your doubt.
finally done by recursion ,
Is your insertion sort code working now? Or you want me to help you wit it?
Have also debugged your insertion sort question, check here, now it’s giving correct output for both even and odd.
getting segmentation fault again
5
2 3 4 1 5
run for this test case
Got it, just a little edit in your code. Handle that case in which shortest element lies in between linked list. Cause only issue in your code is with the shortest element not at it exact place. See for any test case
1 …(any numbers greater then 1 in any order)…
you will always get right output.
To avoid add int_min in your head of linked list, then perform insertion sort. And then delete head of linked list which is int min then you will get right output.
5
1 5 2 3 4
it runs for this
5
2 5 4 1 3
segmentation fault for this
Check now
submitted on coding block
but why it runs?
if we add INT_MIN
Starting mai stack mai jb node push krte hai or usse pop krwa rhe hai toh usse head ka link break ho rha hai. Code ka logic ek dum shi hai , yeh bs stack thoda pareshan krta hai in side cases mai. Isliye sbse choti value daal do stack mai. Joh int min hai. Uske baad usse remove krke print kra do. Answer required.
ye samaj nahi aa raha hai;
