Algorithms
AI记忆
这个作者很懒,什么都没留下…
展开
-
Pattern Searching
Problem Definition: Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n >原创 2013-05-27 11:32:49 · 1361 阅读 · 0 评论 -
Divide and Conquer
Divide and Conquer is an algorithmic paradigm based on multi-branched recursion. A typical Divide and Conquer algorithm solves a problem using following three steps: 1. Divide: Break the giv原创 2013-05-28 11:42:02 · 3615 阅读 · 0 评论 -
Greedy
Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy algorithms are used for optimiza转载 2013-05-29 19:40:56 · 1169 阅读 · 0 评论 -
Dynamic Programming
Dynamic Programming is an algorithmic paradigm that solves a given complex problem by breaking it into subproblems andstores the results of subproblems to avoid computing the same results again. Follo原创 2013-05-30 10:22:54 · 1257 阅读 · 0 评论 -
Sorting
A sorting algorithm is an algorithm that puts elements of a list in a certain order. The most-used orders are numerical order and lexicographical order. There are two mainly kind of sorting algori原创 2013-05-31 10:37:51 · 1756 阅读 · 0 评论 -
Bit manipulation
When should you use bitwise operators? Bitwise operators are used forsaving more space orsaving some time. There are also times when you need to use bitwise operators: if you're working with co原创 2013-06-03 11:42:00 · 3188 阅读 · 2 评论 -
Time complexity analysis: solving recurrences
There are there main methods to solve this problem. 1. sunstitution method 1.1 guess the form of solution, the recursion-tree method can help to get a good guess 1.2 use mathematical in原创 2013-07-23 22:18:05 · 1342 阅读 · 0 评论