Hey guys I need some help with my assignment. First let me start off by telling you guys that I am new to program writing. My professor isn't helping us at all, in fact half of my class has dropped the course. I have to write a program that has a sorted list that can't be an array. I must also incorporate a palindrome into the program and it must be in GUI. Can some one help?

Hey guys I need some help with my assignment. First let me start off by telling you guys that I am new to program writing. My professor isn't helping us at all, in fact half of my class has dropped the course. I have to write a program that has a sorted list that can't be an array. I must also incorporate a palindrome into the program and it must be in GUI. Can some one help?

Hello I did a palindrome, but what do you mean by sorted list.

Hello I did a palindrome, but what do you mean by sorted list.

I'm sorry, like a linked list. or using a Queue or hash tables.

I'm sorry, like a linked list. or using a Queue or hash tables.

Hash tables are just a way to organise data so that retrieval of specific parts are quicker than a bog standard linear list. It can be likened to a binary search tree, where you separate the data into sections.

By sort you mean what exactly? Doyou wish to sort a list of potential palindromes into alphabetical order and then use the stack to test if they are palindromes?

I want to sort a list of potential palindromes into alphabetical order and then use the stack to test if they are palindromes.

you can't use any of the standard List classes for that.
There's a SortedSet which you could use but it isn't a List.

Either use another style of Collection or write your own SortedList which I've actually done about 2 years ago, took me only a few hours.
Can't give you the code, it belongs to the company, but it's rather simple to wrap a List interface around a SortedSet (for example).

I'm sorry, like a linked list. or using a Queue or hash tables.

It's unlikely that your teacher would be so vague as to give you an assignment, asking to use either a queue or a hash table or a linked list.

I want to sort a list of potential palindromes into alphabetical order and then use the stack to test if they are palindromes.

This is an exact reguritation of what I just said previously. Something fishy is going on here. And I fail to see the benefit of sorting the list into alphabetical order anyway?

Can't give you the code, it belongs to the company, but it's rather simple to wrap a List interface around a SortedSet (for example).

My my, your company must be particularly fussy if they don't let you release a code so trivial. ;)

any code you write during office hours belongs to the company, not just complex code.
Depending on your contract (and legal conditions in your locale) they could even claim that any code you write during your spare time belongs to them as well.

This article has been dead for over six months. Start a new discussion instead.