![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
algorithm
SupportScalarMachine
Learning Algorithm & Machine Learning.
展开
-
Algs4_5.4 Regular Expressions
非确定有限状态自动机 当且仅当一个NFA从状态0开始从头读去了一段文本中的所有字符,进行了一系列状态转换,并最终到达了接受状态时,则称该NFA识别了一个文本字符串。 5 模拟NFA的运行5.1 自动机的表示用char数组re[]表示正则表达式本身,也表达了匹配转换。使用有向图GG表示所有不读取字符的转换(ϵ\epsilon-转换)5.2 NFA的模拟与可达性纪录自动机在检查当前输入字符时可能遇到翻译 2015-05-09 21:52:18 · 394 阅读 · 0 评论 -
任务调度问题
优先级限制下的任务调度问题解决并行任务任务调度问题的关键路径方法: 创建一幅无环加权有向图GG: 创建一幅无环加权有向图,包含起点ss和终点tt; 对每个任务题阿佳一条从起始顶点指向它的结束顶点的边,权重位任务所需的时间; 对每个优先级限制v→wv\to w,调价一条从v的结束顶点指向w起始顶点边,权重为00; 添加从s指向每个起始顶点的边,权重为00; 添加从每个结束顶点指向t的边,权重为00;转载 2015-05-13 11:25:17 · 922 阅读 · 0 评论 -
ALGS4_5.2 Tries
Tries PropertiesTrie Symbol Table Proposition F. Properties of tries The linked structure(shape) of a trie is in dependent of the key insertion/deletion order: there is a unique trie for any giver set翻译 2015-05-08 20:13:31 · 404 阅读 · 0 评论 -
Leetcode 48: Rotate Image
Problem: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? 利用处于中心的极坐标变换: (r′t,θ′t)=(r,θ−π/2)(r_t原创 2015-05-15 23:59:06 · 262 阅读 · 0 评论 -
Leetcode : Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2,1,−5,4], the contiguous subarray [4,−1,2,1] h原创 2015-05-16 00:29:48 · 267 阅读 · 0 评论 -
Leetcode: Wildcard Matching
Problem Problem: ‘?’ Matches any single character. ‘*’ Matches any sequence of characters (including the empty sequence). The matching should cover the entire input string (not partial).原创 2015-05-16 14:16:32 · 313 阅读 · 0 评论 -
最长单调递增子序列
来自十五章动态规划两个练习题15.4-5 15.4-6O(n2)O(n^2)算法初步的方法是O(n2)O(n^2)的算法。God Xu 指点我: - 令Y = sort(X) - 求X、Y的最长公共子序列O(nlgn)O(n \lg n)算法下一题要求用O(nlgn)O(n \lg{n}) 时间的算法,经过查阅资料, 得到如下算法:__author__ = 'burger'#用二分搜索找最大转载 2015-05-15 12:35:56 · 359 阅读 · 0 评论 -
Leetcode: Word Break
Word Break Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s = “leetcode”,原创 2015-05-17 03:15:27 · 263 阅读 · 0 评论