Hello, I'm hoping you guys can help.
I have a double linked list, and i am trying to add a bubble sort to it,I am really new to java, I've been able to do a bubble sort with great easy whilst using binary trees, but now i'm using a double linked list, and i don't have a clue how to do it. It's been driving me mad, and i really need help on this.
Any help will be much appreciated.

A bubble sort just needs to compare and maybe swap two consecutive members of the list a few times.
Forget the sort for a minute, and write a method to compare two consecutive members of your DLL. Now write a method to swap two consecutive members of your DLL. Now you can implement your bubble sort without worrying about the mechanics of your DLL.
It's always the same: break the problem into small pieces, and solve them one at a time.

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.