自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(295)
  • 收藏
  • 关注

转载 各种机器学习的应用场景

转载自:https://www.zhihu.com/question/26726794/answer/151282052作者:xyzh链接:https://www.zhihu.com/question/26726794/answer/151282052来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。关于这个问题我今天正好

2017-05-02 17:16:43 1535

转载 A summary: how to use bit manipulation to solve problems easily and efficiently

转载自: https://discuss.leetcode.com/topic/50315/a-summary-how-to-use-bit-manipulation-to-solve-problems-easily-and-efficientlyWIKIBit manipulation is the act of algorithmically manipulat

2017-05-02 17:13:49 477

转载 机器学习算法集锦:从贝叶斯到深度学习及各自优缺点

引用自:https://zhuanlan.zhihu.com/p/25327755在我们日常生活中所用到的推荐系统、智能图片美化应用和聊天机器人等应用中,各种各样的机器学习和数据处理算法正尽职尽责地发挥着自己的功效。本文筛选并简单介绍了一些最常见算法类别,还为每一个类别列出了一些实际的算法并简单介绍了它们的优缺点。https://static.coggle.

2017-05-02 17:11:42 1169

原创 LeetCode Summary Tree

============================= Tree ===============================先中后->树105. Construct Binary Tree from Preorder and Inorder Traversal(先序+中序->树)先序遍历第一个是根,中序遍历用这个根分成左右子树106. Construct Binar

2017-02-10 17:10:29 548

原创 LeetCode Summary STL Stack Queue

--------------------------------- map/set/vector -----------------------------------------380. Insert Delete GetRandom O(1)(设计一个数据结构,可以插入、删除、随机返回元素)381. Insert Delete GetRandom O(1) - Duplicates a

2017-02-10 17:09:59 399

原创 LeetCode Summary Sort

============================ Sort =================================------------------------- Merge Sort --------------------------88. Merge Sorted Array(合并2个有序数组):朴素315. Count of Smaller

2017-02-10 17:09:26 344

原创 LeetCode Summary Search

=========================== Search ===================================------------------------------ Backtracking  ----------------------------------------找到所有子集39. Combination Sum 40. Combi

2017-02-10 17:08:55 363

原创 LeetCode Summary Math

============================ Math ====================================343. Integer Break(给定一个数n,拆成乘积最大的一堆数)要三不要二 要二不要一约数倍数365. Water and Jug Problem(容器量出指定水)Discuss: 转换成了GCD400.

2017-02-10 17:08:08 423

原创 LeetCode Summary Linked List

============================== Linked List ============================复制138. Copy List with Random Pointer(复制一个乱七八糟的链表)S1(Mine): 用递归,指向什么,就新生成一个node,让这个node等于递归当前点指向的东西         用hash记录节点地

2017-02-10 17:07:29 289

原创 LeetCode Summary Hash Table

============================= Hash Table =============================36. Valid Sudoku(判断一个表格是不是数独)S1(Mine): 每行每列分别计数即可49. Group Anagrams(使用相同字母的单词分在同一组)S1(Mine): 每个单词排序,排好序后相同的字符串,用map记录在an

2017-02-10 17:06:51 316

原创 LeetCode Summary Graph

========================================== Graph =========================================------------------------------------ Topological Sort ------------------------------------207. Course

2017-02-10 17:06:05 332

原创 LeetCode Summary Dynamic Programming

============================ Dynamic Programming ===============================斐波那契f[i]:第i个的值70. Climbing Stairs(1或2步爬楼梯)f[i]=f[i-1]+f[i-2];91. Decode Ways(编码方式的个数)int tmp=((s[i-1]-'0

2017-02-10 17:05:32 342

原创 LeetCode Summary Array and Matrix

=========================================== Array ========================================中位数4. Median of Two Sorted Arrays(两有序数列,求他们的中位数,O(log (m+n)).)S1:最朴素,两个数列归并排序,选取中间位置。S2:two pointe

2017-02-10 17:03:57 427

原创 LeetCode 2016 132,68,71,97,10,44

132 Palindrome Partitioning II// ----------------Seeing Discuss-----------/* copying codes url https://discuss.leetcode.com/topic/2840/my-solution-does-not-need-a-table-for-palindrome-is-it-rig

2016-12-29 16:19:23 384

原创 LeetCode 2016 37,65,212,84,130,218

37 Sudoku Solver// ----------------Seeing Discuss-----------/* copying codes url https://discuss.leetcode.com/topic/5002/a-simple-dfs-solution Analysis: */class Solution {public: bool is

2016-12-29 16:16:21 87295 3

原创 LeetCode 2016 273,233,174,149,146

273 Integer to English Words/* My thoughts 1. 写一个专门处理三个数字的函数,注意应对001等Leading zeros的问题 2. 空格的处理:当要写入ans时,若ans.size()!=0,加空格后再写入 3. 注意单词不要拼写错误 4. 有负数*/class Solution {public: vector Wo

2016-12-27 17:15:44 381

原创 LeetCode 2016 85,124,355,126,306

85 Maximal Rectangle// -----------------See Discuss------------------// url:// https://discuss.leetcode.com/topic/6650/share-my-dp-solution// Analysis/* The DP solution proceeds row by row, st

2016-12-27 17:12:06 1133

原创 LeetCode 2016 385,365,211,115

385 Mini Parser// -------------------- Seeing Discuss -----------// I really have no idea about this kind of problem// I just retyped the codes from discuss// url:// https://discuss.leetcode.co

2016-12-27 17:09:53 358

原创 LeetCode 2016 295,188,321,135,335

295 Find Median from Data Stream// I thought maybe can use two heaps, one is min heap, one is max heap. // keep the balance of the two heaps, the size equall, or min is 1 greater than max// min-he

2016-12-21 23:22:08 5637

原创 LeetCode 2016 391,297,87,93

391 Perfect Rectangle// -------------------Seeing Discuss & Searching the Solutions// Analysis:/* 任意一个矩形均有4个顶点,当出现Perfect Rectangle时,在最大覆盖矩形内部, 所有其它矩形的任意一个顶点均会出现偶数次(因为一个矩形旁边应当有一个或三个矩形 和它紧密相连,那么

2016-12-21 23:21:34 327

原创 LeetCode 2016 373,322,324,316

373 Find K Pairs with Smallest Sumsclass Solution {public: struct Node { int sum,i,j; Node(int s,int x,int y):sum(s),i(x),j(y){}; }; vector sums; static bool cmp

2016-12-21 23:16:53 492

原创 LeetCode 2016 134

134 Gas Station// ----------Seeing Discuss---------------// Here is the Analysis from the Discuss// """ 1. If car starts at A and can not reach B. Any station between A and B// can not reach B.

2016-12-21 23:13:41 23490

原创 LeetCode 2016 307

307 Range Sum Query - Mutable// Segment Tree with build, update, query// Pay attention to the size of segTree[], may cause REclass NumArray{public: NumArray(vector &nums) { num=n

2016-12-21 23:12:36 1384

原创 LeetCode 2016 139,140,220

139 Word Break// Thought:// After several fails, I finally made it!// Core thought: convert the dic words according to the string s to vector of intervals// then, sort the intervals, and mark

2016-12-17 10:27:40 44820

原创 LeetCode 2016 327,315,372,368,363,330,239

327 Count of Range Sum// See the discuss// See the analysis and using the code from:// http://www.cnblogs.com/jdneo/p/5388501.html// It is a solution combining the two pointers & merge sort// Th

2016-12-15 23:16:27 576

原创 LeetCode 2016 400,398,397,396,393,352,284

400 Nth Digitclass Solution {public: vector f; vector g; vector tens; int dUpper = 10; int th = 9; void countNumbers() { long long ten = 1; long long nin

2016-12-15 23:12:32 271

原创 LeetCode 2016 5,214,336,76,30,32,60

5 Longest Palindromic Substringclass Solution{public: string str; int len; string longestPalindrome(string s) { str = s; len = s.size()-1; return force();

2016-12-15 23:08:48 251

原创 LeetCode 2016 332,127,25,23,143,114

332 Reconstruct Itineraryclass Solution {public: bool sign; vector ans; vector anstmp; int n; int ntickets; vector >used; vector > road; map relation; map itosre

2016-12-15 23:05:11 239

原创 LeetCode 2016 310,304,145,98,301,388,99

310 Minimum Height Treesclass Solution{public: vector findMinHeightTrees(int n, vector >& edges) { vector > grid; int len=edges.size(); grid.clear(); grid.r

2016-12-15 22:59:42 452

原创 LeetCode 2016 123,381,331,375,86,207,210

123 Best Time to Buy and Sell Stock IIIclass Solution {public: int maxProfit(vector& prices) { int len=prices.size(); if (len<2) return 0; int release2=0,hold2=INT_M

2016-12-15 22:56:02 346

原创 LeetCode 2016 45,57,414,413,289,106,105

45 Jump Game IIclass Solution {public: int jump(vector& nums) { int len=nums.size(); if (len==1) return 0; int ans=0,maxPos=0,lastmax=0; for(int i=0;i<len-1;

2016-12-15 22:51:15 468

原创 LeetCode 2016 380,42,11,4,438,229,56,312

380 Insert Delete GetRandom O(1)class RandomizedSet {public: /** Initialize your data structure here. */ RandomizedSet() { s.clear(); } /** Inserts a value to the set.

2016-12-15 22:47:58 295

原创 LeetCode 2016 424,187,200,376,390,354,15,18,419

424 Longest Repeating Character Replacementclass Solution {public: int characterReplacement(string s, int k) { int ans=0; int ls=s.size(); vector letters; in

2016-12-15 22:42:08 282

原创 LeetCode 2016 423,412,409,89,29,166,91,79

423 Reconstruct Original Digits from Englishclass Solution{public: void makeSch(vector > &sch) { sch.push_back(make_pair('g'-'a',8)); sch.push_back(make_pair('u'-'a',4));

2016-12-15 22:37:57 299

原创 LeetCode 2016 406,386,404,394,399

406 Queue Reconstruction by Heightclass Solution {public: vector > reconstructQueue(vector >& people) { int len=people.size(); vector > ans; ans.clear(); sor

2016-12-15 22:33:31 273

原创 LeetCode 2016 392,337,309,201,416

392 Is Subsequenceclass Solution {public: bool isSubsequence(string s, string t) { int ls = s.length(), lt= t.length(); if (ls==0) return true; int ps=0; boo

2016-12-15 22:27:16 290

原创 LeetCode 2016 8,357,367,69,378

8 String to Integer (atoi)class Solution {public: int myAtoi(string str) { int ans=0,len=str.length(),flag=1; if (len==0) return ans; int st=0; bool cntflag=

2016-12-15 22:23:31 255

原创 LeetCode 2016 349, 383, 387, 384, 350, 374, 377

349 Intersection of Two Arraysclass Solution {public: vector intersection(vector& nums1, vector& nums2) { settmpans; vector ans; int ln1=nums1.size(),ln2=nums2.size(

2016-12-15 22:20:13 348

原创 LeetCode 2016 167,382

167 Two Sum II - Input array is sortedclass Solution {public: vector twoSum(vector& numbers, int target) { vector ans; ans.clear(); int len=numbers.size(); i

2016-12-15 22:13:36 224

原创 LeetCode 2016 338,347,343

338 Counting Bitsclass Solution {public: vector countBits(int num) { vector ans; ans.clear(); ans.resize(num+1); ans[0]=0; int p; if (num<=0)

2016-05-13 15:47:10 497

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除