What is a differrent between sorted and unsorted lists?
The important points...

Recommended Answers

All 4 Replies

sorted lists means the items are in alphabetical or numeric order, unsorted means they are in just some random order.

lol

Are you talking about a singly-linked list, a doubly-linked list, or an STL list? Typically lists are unsorted and you would have to pass it into a method that will sort it. If you want a sorted list, consider using a different data container. Check the C++ website for types of data containers and you find something that might be more efficient for your use.

Best way to sort a list is to sort it as you add new items. My 2 cents.

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.