![]() |
Sort Linked List
On 7th June, 2007
|
Authorshabbir ( Go4Expert Founder )
Recent Articles
Similar Articles
Basic operations in Linked ListI thought why not also have the one which sorts the linked list as well. I did not submit it because I thought the above list is sufficient for sorting as well but because of lots of query regarding the same I thought lets have it online as well. Note: I had a major bug pointed out by RiOrius and is rectified now. Thanks for letting me know about it. Code: Cpp
|
|
|
#2 |
|
Go4Expert Member
Join Date: Jul 2007
Location: Delhi
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 ![]() |
Re: Sort Linked List
Hi, The code you have written is good but according to me the sorting function should be small, its too complex.
__________________
Thanks and Regards Shishir |
|
|
|
|
|
#3 | |
|
Go4Expert Founder
![]() |
Re: Sort Linked ListQuote:
|
|
|
|
|
|
|
#4 |
|
Go4Expert Member
![]() Join Date: Jun 2007
Location: Chennai
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 ![]() |
Re: Sort Linked List(Simple coding for sorting)Code: Cpp
Last edited by shabbir; 07-31-2007 at 07:49 PM. Reason: Code block |
|
|
|
|
|
#5 |
|
Go4Expert Founder
![]() |
Re: Sort Linked List
Thats a good one. Yours is a Linear sort and I have used bubble sort but I am sure with bubble sort also some code blocks can be made shorter.
|
|
|
|
|
|
#6 | |
|
Go4Expert Member
Join Date: Jul 2007
Location: Delhi
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 ![]() |
Re: Sort Linked ListQuote:
I think it is much better than pervious one.
__________________
Thanks and Regards Shishir |
|
|
|
|
|
|
#7 |
|
Go4Expert Member
![]() Join Date: Jun 2007
Location: Chennai
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 ![]() |
Re: Sort Linked List
Thanks shabbir
|
|
|
|
![]() |
|
| Currently Active Users Reading This Article: 1 (0 members and 1 guests) | |
| Article Tools | Search this Article |
| Display Modes | |
| Bookmarks | |
|
|
|
||||||||||||||||||||||||||||||||