算法
文章平均质量分 68
UoM_XiaoShuaiShuai
希望有一天,能够成为肖奈一样的大神!
展开
-
暴力破解(Brute Force)
暴力破解(Brute Force)简介(Introduction) Brute force is a very general problem-solving technique that consists of systematically enumerating all possible candidates for the solution and checking whether each原创 2017-06-11 17:25:51 · 1148 阅读 · 0 评论 -
递归法(Recursion)
递归法(Recursion)简介(Introduction) Recursion occurs when a thing is defined in terms of itself or of its type. Recursion is an important algorithmic design technique. In this blog, we talk about some algo原创 2017-06-11 16:58:31 · 443 阅读 · 0 评论 -
减治法——搜索第k小元素(Decrease and Conquer by a Factor - Finding the kth smallest element)
减治法——搜索第k小元素(Decrease and Conquer by a Factor - Finding the kth smallest element)问题(Problem) Find the kth smallest element in an unsorted array.分割(Partitioning) Partitioning an array around some pivo原创 2017-06-11 16:32:30 · 1342 阅读 · 0 评论 -
减治法——内插法搜索(Decrease and Conquer by a Factor - Interpolation Search)
减治法——内插法搜索(Decrease and Conquer by a Factor - Interpolation Search)内插法搜索(Interpolation Search) If the elements of a sorted array are distributed reasonably evenly, interpolation search performs better原创 2017-06-11 15:59:37 · 1142 阅读 · 0 评论 -
减治法——二分查找算法(Decrease and Conquer by a Factor - Binary Search Algorithm)
减治法——二分查找算法(Decrease and Conquer by a Factor - Binary Search Algorithm)减治法简介(Introduction) Decease-and-Conquer is a famous algorithmic design technique. basically, in the approach the size of problem原创 2017-06-11 14:41:05 · 1668 阅读 · 0 评论 -
图——拓扑排序(Graph - Topological Sort)
图——拓扑排序(Graph - Topological Sort)简介(Introduction) We know some problems in real life can be modelled as graph like task planning. Assume a directed edge from a to b means that task a must be done befo原创 2017-06-11 12:33:44 · 563 阅读 · 0 评论 -
图——广度优先搜索(Graph - Breadth First Search)
图——广度优先搜索(Graph - Breadth First Search)简介(Introduction) Breadth-first search(BFS) visits all nodes in alphabetical order that are one step away from start node, then all nodes that are two steps away原创 2017-06-11 12:09:56 · 821 阅读 · 0 评论 -
图——深度优先搜索(Graph - Depth First Search)
图——深度优先搜索(Graph - Depth First Search)简介(Introduction) Depth-first search(DFS) is an algorithm for traversing or searching tree or graph data structure. One starts at the root(selecting some arbitrary原创 2017-06-11 10:47:18 · 1068 阅读 · 0 评论 -
图——基本概念(Graph - Concepts)
图——基本概念(Graph - Concepts)序言(Preface) Graph algorithms are very practical as a lot of problems in real life can be modelled as graph. Such as, network design, flow design, planning, scheduling, route f原创 2017-06-11 09:38:19 · 774 阅读 · 0 评论 -
分治法——主定理(Divide and Conquer - The Master Theorem)
分治法——主定理(Divide and Conquer - The Master Theorem)Divide-and-Conquer Recurrences What is the time required to solve a problem of size n by divide-and-conquer?Generally, we split the problem into b smal原创 2017-06-10 16:56:38 · 1838 阅读 · 0 评论 -
分治法——树的遍历(Divide and Conquer - Tree Traversal)
分治法——树的遍历(Divide and Conquer - Tree Traversal)二叉树概念(Binary Tree Concepts) This is a binary tree with height h = 4. 口 represents empty tree with height h = -1. 口 is an external node only at level h a原创 2017-06-10 15:03:35 · 1186 阅读 · 0 评论 -
Transform and Conquer - Instance Simplification
Transform and Conquer - Instance Simplification原理(Principles) Try to make the problem easier through some pre-processing, typically sorting. We can pre-sort input to speed up.Uniqueness Checking - Bru原创 2017-06-10 14:06:15 · 749 阅读 · 0 评论 -
平衡树——2-3树(Binary Search Tree - 2-3 Tree)
平衡树——2-3树(Binary Search Tree - 2-3 Tree)简介(Introduction) 2-3 trees and 2-3-4 trees are binary search trees that allow one node have more than one items stored. For BSTs, a node that holds a single i原创 2017-06-10 12:56:27 · 1323 阅读 · 0 评论 -
平衡树——自平衡二叉树(Balanced Tree - AVL Tree)
平衡树——自平衡二叉树(Balanced Tree - AVL Tree)定义(Definition) An AVL tree is a self-balancing binary search tree. It was named after its two inventors: Georgy Adelson-Velsky and Evgenii Landis. Recall that we d原创 2017-06-10 11:59:05 · 1687 阅读 · 0 评论 -
时空权衡——字符串匹配(Time/Space Tradeoff - Horspool's String Matching)
时空权衡——字符串匹配(Time/Space Tradeoff - Horspool’s String Matching)字符串匹配简介(Introduction) String matching is to find a place where one or several strings(called pattern) are found within a large string or te原创 2017-06-10 09:24:34 · 846 阅读 · 0 评论 -
时空权衡——斐波那契数列(Time/Space Tradeoff - Fibonacci Sequence)
时空权衡——斐波那契数列(Time/Space Tradeoff - Fibonacci Sequence)斐波那契数列简介(Introduction) In mathematics, the Fibonacci numbers are the numbers in the following integer sequence, called Fibonacci sequence, charact原创 2017-06-10 08:15:01 · 803 阅读 · 0 评论 -
时空权衡——哈希法(Time/Space Tradeoff - Hashing)
时空权衡——哈希法(Time/Space Tradeoff - Hashing)哈希法简介(Introduction) Hashing is a standard way of implementing the abstract data type “dictionary”, which is a set with the operations of searching, insertion, d原创 2017-06-09 14:21:54 · 1462 阅读 · 0 评论 -
动态规划算法——弗洛伊德算法(Dynamic Programming Algorithm - Floyd's Algorithm)
动态规划算法——弗洛伊德算法(Dynamic Programming Algorithm - Floyd’s Algorithm)伪代码(Pseudocode)function Floyd(W[1..n, 1..n]) D ⟵ W for k ⟵ 1 to n do for i ⟵ 1 to n do for j ⟵ 1 to n do原创 2017-06-09 11:29:02 · 1790 阅读 · 0 评论 -
动态规划算法——沃夏尔算法(Dynamic Programming Algorithm - Warshall's Algorithm)
动态规划算法——沃夏尔算法(Dynamic Programming Algorithm - Warshall’s Algorithm)传递闭包(Transitive Closure) “The transitive closure of a directed graph with n vertices can be defined as the n × n boolean matrix T = {原创 2017-06-07 18:41:31 · 1713 阅读 · 0 评论 -
动态规划算法——背包问题(Dynamic Programming Algorithm - Knapsack Problem)
动态规划算法——背包问题(Dynamic Programming Algorithm - Knapsack Problem)背包问题(Knapsack Problem) (picture is from https://en.wikipedia.org/wiki/Knapsack_problem) The knapsack problem is a problem in combinator原创 2017-06-07 15:11:36 · 4669 阅读 · 0 评论 -
贪心算法——狄克斯特拉算法(Greedy Algorithm - Dijkstra's Algorithm)
贪心算法——狄克斯特拉算法(Greedy Algorithm - Dijkstra’s Algorithm)最短路径问题(The Single-Source Shortest Path Problem) In real life, the single-source shortest path problem is everywhere. For example, you bought a blo原创 2017-06-01 12:27:51 · 1995 阅读 · 0 评论 -
贪心算法——普林姆算法(Greedy Algorithm-Prim's Algorithm)
贪心算法——普林姆算法(Greedy Algorithm-Prim’s Algorithm)贪心算法简介(Introduction of Greedy Algorithm) (pic: https://www.sicas.cn/Students/Info/Content_110622143056742.shtml)There is a common situation in which a c原创 2017-05-31 17:06:49 · 2885 阅读 · 1 评论 -
排序算法——归并排序(Merge Sort)
排序算法——归并排序(Merge Sort)算法简介(Merge Sort) Merge sort is an excellent application of “Divide-and-Conquer” algorithmic technique. It starts by dividing an array A[0..n-1] into two halves B[0..n/2-1] and C原创 2017-05-30 13:06:52 · 1093 阅读 · 0 评论 -
排序算法——希尔排序(Shell Sort)
排序算法——希尔排序(Shell Sort)算法简介(Introduction) Insertion sort shifts elements which are out of order one position. For example, an array 1, 3, 2, 4, 5. Shift 3 to 2. It turns 1, 2, 3, 4, 5. The distance of原创 2017-05-29 18:46:29 · 900 阅读 · 0 评论 -
排序算法——堆排序(Heap Sort)
排序算法——堆排序(Heap Sort)堆(Heap) Heap is a complete binary tree which satisfies the heap condition: Each child has a key which is no greater than its parent’s.There are some trees, which are heaps? which原创 2017-05-29 10:04:07 · 1118 阅读 · 0 评论 -
排序算法——快速排序(Quick Sort)
排序算法——快速排序(Quick Sort)算法简介(Introduction) Quick sort is based on devide-and-conquer approach. A big problem is decided into small problems, and then solve small problem first. For example, 100 elements原创 2017-05-28 17:35:04 · 1139 阅读 · 0 评论 -
排序算法——冒泡排序(Bubble Sort)
排序算法——冒泡排序(Bubble Sort)算法简介(Introduction) Bubble sort is to compare adjacent elements of the list and exchange them as long as they are out of order. By repeatly compare and exchange, the largest elem原创 2017-05-28 14:33:30 · 848 阅读 · 0 评论 -
排序算法——选择排序(Selection Sort)
排序算法——选择排序(Selection Sort)算法简介(Introduction) We start selection sort by scanning entire given list to find its smallest element and exchange it with the first element, putting the smallest element in原创 2017-05-28 12:58:40 · 911 阅读 · 0 评论 -
排序算法——插入排序(Insertion Sort)
排序算法——插入排序(Insertion Sort)伪代码(Pseudocode):function INSERTIONSORT(A[0..n-1]) for i ⟵ 1 to n-1 do v ⟵ A[i] j ⟵ i-1 while j ≥ 0 and v < A[j] do A[j+1] ⟵ A[j]原创 2017-05-27 12:18:53 · 1181 阅读 · 0 评论
分享