please give the program for sorting a linked list without affecting the original value
alamu
0
Newbie Poster
Recommended Answers
Jump to PostNobody is going to do your homework for you. But I'll give you a push in the right direction. You essentually have two options:
- Build a new list in sorted order while traversing the old list.
- Sort the old list into a new list.
It's a fairly subtle difference …
Jump to Posti wonder how did u become administrator without having any basic knowlege of c language ?
The two are unrelated. But if you want to discuss aspects the C language or standard library, I'll be happy to school you in a debate.
now just get lost from …
Jump to Postmoderator eyes have stopped completely working
@ra527: Even after having been banned twice, why do you insist on posting such rude comments? You still have a lot to learn, not just about programming (your code is sloppy at best) but also on how to behave.
Jump to PostHey I found another logic to sort Linked lists by bubble sort .
Here goes my code .#include <stdio.h> #include <stdlib.h> /* structure for a node */ struct Node { int data; struct Node* MeghanaChowdary; } Node; /*Function to swap the nodes Yedu Chepala Katha */ …
Jump to PostSatya Chowdary My logic is the bests one .
I sorted the list by radix sort .
#include <stdio.h> #include <stdlib.h> #include <time.h> typedef unsigned int Mylucky8; #define TRIES 10000 #define COUNT 1000 unsigned long qrand() { static unsigned long seed = 1; return ( …
All 39 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
alamu
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
Sokurenko
42
Junior Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
raj527
0
Newbie Poster
raj527
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
alamu
0
Newbie Poster
alamu
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
ra527
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
ra527
0
Newbie Poster
_avishek
29
For as long as space endures
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
milkshek
-5
Newbie Poster
I_m_rude
alamu
0
Newbie Poster
I_m_rude
alamu
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
jameslowde
0
Newbie Poster
optimus_prime_1
-6
Newbie Poster
optimus_prime_1
-6
Newbie Poster
nndung179
0
Light Poster
gaandu_danibeb
0
Newbie Poster
satya_19
-6
Newbie Poster
Schol-R-LEA
commented:
You do understand that this post was from 8 years ago, right?
-3
tinstaafl
commented:
and is C code not c++
-3
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.