Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Comparing sorting algorithms

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm comparing 4 types of sorting algorithms. Bubble sort (pair-wise), selection sort, merge sort, and quick sort. How do I go about finding out what each algorithms memory usage so I can compare them to each other???
 
Marshal
Posts: 8432
606
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Aron Silvester wrote:I'm comparing 4 types of sorting algorithms. Bubble sort (pair-wise), selection sort, merge sort, and quick sort. How do I go about finding out what each algorithms memory usage so I can compare them to each other???

Memory usage Why do you need to know that?

Aren't you interested in time complexity for each of them? Try to read about time complexity (<- link) and most popular sorting algorithms, (<- link) you might find some answers you're looking for.
 
Marshal
Posts: 76486
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you look for whether the algorithms are stable or not, that is also useful to know.
 
Saloon Keeper
Posts: 14327
321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Keep in mind that all these sorting algorithms can be performed 'in-place'. At the cost of speed, stability and/or clearness, they can be performed using a constant amount of memory.
 
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic