上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 20 下一页
摘要: Given a string, find the first non repeating character in it and return it's index. If it doesn't exist, return 1. Examples: Note: You may assume the 阅读全文
posted @ 2016-08-22 00:52 健康平安快乐 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 53. Maximum Subarray Difficulty: Medium Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For e 阅读全文
posted @ 2016-07-31 23:33 健康平安快乐 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 《算法设计与分析基础》 之 穷举查找 对于背包问题,穷举查找算法对于任何输入都是非常低效率的。 旅行商问题和背包问题是NP困难问题中最著名的例子。 对于NP困难问题,目前没有已知的效率可以用多项式来表示的算法。 《算法的乐趣》 之 0 1背包问题 0 1 背包问题在题目中隐含了一个条件,就是每个物品 阅读全文
posted @ 2016-07-11 10:14 健康平安快乐 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 章节梳理 1. 时间——时间观念(津巴多时间心理学) 2. 选择——做出选择 3. 行动——克服拖延 4. 学习——从做中学,目标导向 5. 思维——善于思考(开发复杂项目前,先画好模块间调用关系等细节) 6. 才能——学习正确努力方式 7. 成功——保持你的唯一性 每章总结 第1章 时间之尺——我 阅读全文
posted @ 2016-07-01 08:57 健康平安快乐 阅读(2141) 评论(0) 推荐(2) 编辑
摘要: Greedy Algorithm 《数据结构与算法——C语言描述》 图论涉及的三个贪婪算法 1. Dijkstra 算法 2. Prim 算法 3. Kruskal 算法 Greedy 经典问题:coin change 在每一个阶段,可以认为所作决定是好的,而不考虑将来的后果。 如果不要求最对最佳答 阅读全文
posted @ 2016-06-27 07:42 健康平安快乐 阅读(6230) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given t 阅读全文
posted @ 2016-06-22 07:12 健康平安快乐 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 大纲 1. 动态规划和递归介绍 2. 基本思路 3. 记忆化搜索 4. 经典例题 5. 总结(矩阵,序列动态规划 ) 1. 动态规划和递归介绍 递归和动态规划比较 相同:都能分解成若干子问题。 不同:DP 存储子问题结果。 动态规划介绍 1. 算法的核心在于找到状态转移方程 2. Build app 阅读全文
posted @ 2016-06-21 15:35 健康平安快乐 阅读(1739) 评论(0) 推荐(0) 编辑
摘要: 题目 Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty sp 阅读全文
posted @ 2016-06-21 07:57 健康平安快乐 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目 55. Jump Game Given an array of non negative integers, you are initially positioned at the first index of the array. Each element in the array repr 阅读全文
posted @ 2016-06-21 07:48 健康平安快乐 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a m x n grid filled with non negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its pat 阅读全文
posted @ 2016-06-20 08:38 健康平安快乐 阅读(162) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 20 下一页