rithish 13 Junior Poster in Training 12 Years Ago just tell me will this sorting algorithm work out in linked list Copy to Clipboardfor(i=head;i!=null;i=i->next) for(j=i->next;j!=null;j=j->next) if(i->data>j->data) { temp=i->data; i->data=j->data; j->data=temp; } c 0 0 Share deceptikon 1,790 Code Sniper Team Colleague Featured Poster 12 Years Ago The concept is sound, but super inefficient due to the overhead of chasing pointers. 0 0 Share rithish 13 Junior Poster in Training 12 Years Ago why will time complexity go too much???? 0 0 Share deceptikon 1,790 Code Sniper Team Colleague Featured Poster 12 Years Ago Time complexity doesn't change, but the overhead of individual operations changes noticeably between array indexing and link chasing. 0 0 Share Share Facebook Twitter LinkedIn Reply to this topic 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. Sign Up — It's Free!
deceptikon 1,790 Code Sniper Team Colleague Featured Poster 12 Years Ago The concept is sound, but super inefficient due to the overhead of chasing pointers. 0 0 Share
deceptikon 1,790 Code Sniper Team Colleague Featured Poster 12 Years Ago Time complexity doesn't change, but the overhead of individual operations changes noticeably between array indexing and link chasing. 0 0 Share