• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

difference between sorting and ordering

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
het every one!

i have a small confusion related to the difference between sorting and ordering?

i think ordering and sorting means the same? isnt it?

if you see ordering it means that the array is in a particular order wether it is like large to small or somthing like that!

and if you take sorting it also means almost same that you sort the array in an ascending or descending order?

i am right ? please intimate where i went wrong?
 
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ordering : it means there is a proper way you can predict the transversal of the content of a data holder like fifo or lifo
Sorting : it is a type of ordering which adheres some special ordering algorithm apart from the insertion order. like ascending or descending

the key part is that ordering doesn't depend upon the property of the element inserted but sorting does.

for ex in ascending ith element <i+1th element
 
vijay umar
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks !

i am now clear about it!
 
Sheriff
Posts: 9709
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since sorting is a type of ordering, so when a collection is sorted, it is automatically ordered. You might face a question asking if a sorted collection is automatically ordered (which is true) or if an ordered collection is automatically sorted (which is false)...
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic