• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Different ways you can sort?

 
Greenhorn
Posts: 13
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was reading a thread on this game development forum and I came across a question that's a little intimidating because I have no idea how I would answer it if I was asked.

Algorithms and data structures form the absolute core of computer science, and it is an area most younger programmers are severely lacking.
That's fine that you can get stuff on the screen, but can you do it efficiently?

For example, good CS graduates will frequently pick and choose between various sort algorithms. One frequent question I use in technical interviews is to ask for as many ways to sort as the person can think of, and when each is better. Most CS programs will teach ten or so, along with the reasons why each is superior for different cases.  Most industry veterans can name off several methods that they use frequently, and some they never or seldom use



So, in the interest of learning, using Java, how many different ways can you sort, and which is better?

Side Note: I have a feeling this question might go beyond the scope of Java, if so, can one of the admins move it to a more appropriate forum?
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Abigail Rosemond wrote:
Side Note: I have a feeling this question might go beyond the scope of Java, if so, can one of the admins move it to a more appropriate forum?



From reading the snippet, I agree that the author is discussing algorithms in general, and not what libraries (and API) is supported by Java. So, not really (at its core) Java related, but, there isn't really a good place to move this topic either.

Henry
 
Abigail Rosemond
Greenhorn
Posts: 13
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:

Abigail Rosemond wrote:
Side Note: I have a feeling this question might go beyond the scope of Java, if so, can one of the admins move it to a more appropriate forum?



From reading the snippet, I agree that the author is discussing algorithms in general, and not what libraries (and API) is supported by Java. So, not really (at its core) Java related, but, there isn't really a good place to move this topic either.

Henry



Ah! I figured this would happen. Let's keep it Java related, in my question I ask how different ways you can sort, and which is best?
 
Abigail Rosemond
Greenhorn
Posts: 13
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found this link. Seems to explain what I'm after.
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wikipedia lists more sorting algorithms. There's no black and white answer to which one is best. It depends largely on the context in which the algorithm will be used.

I will move this to the "General Computing" forum.
 
Marshal
Posts: 79239
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Abigail Rosemond wrote:. . . I came across a question . . .

Algorithms and data structures form the absolute core of computer science . . .

. . .

That statement is inaccurate. Algorithms are probably not the absolute core of CS, because logic lies at a level even deeper.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic