• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Jump List In Java

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

masakabassist

Member
Joined
Aug 31, 2005
Location
Wales!!
Hi all,
As part of my computer science course I have been asked to write a jump list in Java. At the moment I'm searching around to find one as an example as I don't really know where to begin. The reason I have posted this thread is that I can't find a single jump list example online, just a doubly linked list. I'm not going to ask you to write the programme for me, just if you could point me in the right direction for an example programme.

Thanks very much!
 

Trombe

Member
Joined
Mar 13, 2005
Location
Austin, Texas
I didn't even know what a jump list was until wiki'ing it: http://en.wikipedia.org/wiki/Jump_list

Looks like an ordered doubly linked list where the nodes can link to other nodes in a geometric progression down the list to make inserts and deletes faster.

Iv'e never seen that in a text book or heard about it in lecture, so maybe you should ask your prof/TA/pay more attention :)
 
OP
masakabassist

masakabassist

Member
Joined
Aug 31, 2005
Location
Wales!!
I get what it is, just don't really understand how to write it in Java. Programming isn't my strongest point :(
 

dgb303

Member
Joined
Oct 12, 2009
Location
5280, USA
I wish I had an idea about how to throw that into code...I would imagine that it has something to do with an irregularity of the pointer and connecting nodes that allow a wider range of connectivity through the "jumpablity."
 

Cowboy Shane

Member
Joined
Jan 9, 2002
Location
Augusta, GA
If you have done a binary search tree, then the insertions in this list will be somewhat similar. If not, you may want to look at some of the code for BSTs to get an idea of how to do the insertion. Don't forget that your list needs to be ordered.

In fact, I would start by writing an ordered doubly linked list. Get that going, then worry about adding the extra node references in there.
 
OP
masakabassist

masakabassist

Member
Joined
Aug 31, 2005
Location
Wales!!
If you have done a binary search tree, then the insertions in this list will be somewhat similar. If not, you may want to look at some of the code for BSTs to get an idea of how to do the insertion. Don't forget that your list needs to be ordered.

In fact, I would start by writing an ordered doubly linked list. Get that going, then worry about adding the extra node references in there.

That's what I was intending on doing, just trying to find out a way of doing it. At the moment it's confusing the living hell out of me and I have a deadline by Monday :(