• Post Reply Bookmark Topic Watch Topic
  • New Topic

Different ways you can sort?  RSS feed

 
Abigail Rosemond
Greenhorn
Posts: 13
Android Java Windows
  • Mark post as helpful
  • send pies
  • 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?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
I found this link. Seems to explain what I'm after.
 
Junilu Lacar
Sheriff
Posts: 11481
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • 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.
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!