开发者

An example of a beginner-level Algorithm, intermediate level Algorithm and a complex/expert level Algorithm? [closed]

开发者 https://www.devze.com 2023-01-30 02:50 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help cen开发者_运维问答ter. Closed 12 years ago.

I'd like to get a sense for the range of complexity that Algorithms fall into. I think it would be interesting and helpful for those, like me, trying to better understand how algorithms are formulated and how to deconstruct them.

Can you offer a basic algorithm with explanation, an intermediate algorithm with explanation, and maybe an expert level one (with or without) an explanation?


Allow me to refer you to this website for happy brainmunching. http://projecteuler.net/index.php?section=problems

Beginner Algorithm: Find the first element of a sequence that matches a criterion. This is a simple O(n) traversal of, say, a list or array, search for the first truth case it sees and returns the result or index position.

Beginner-Intermediate Algorithm: Define an in-place Heap Sort that requires O(1) memory. This requires playing with memory and enough abstract thinking to break you out of the diapers of computational science.

Intermediate Algorithm: Find the 1,000,000th prime number within 5 seconds of computation time. This is a simple math problem that most programmers should be able to solve in a day, if they consider themselves at all acquainted with computation science.

Intermediate-Advanced Algorithm: Define a genetic algorithm. Not much to say here, just Wikipedia it.

Advanced Algorithm: Define a quantum annealing sort function that finishes in O(n) time. You can earn your Ph.D with this one. I mention something like this that is damn near impossible with a Turing-complete digital computation system because it's in places like this that computation science is treading new ground. Anyone that's advanced in computer science and algorithmic study is concerned with strange ground like this.


From what I remember of my algorithms college course, we first started with various sorts, like merge sort and quick sort, then we learned Dijkstra's algorithm

0

精彩评论

暂无评论...
验证码 换一张
取 消