<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Barbie_1229的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Barbie_1229</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Barbie_1229]]></copyright><item><title><![CDATA[机器学习吴恩达第四章 多变量线性回归]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/80969732</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/80969732</guid><author>Barbie_1229</author><pubDate>Fri, 13 Jul 2018 22:13:19 +0800</pubDate><description><![CDATA[4.1 多维特征模型可以有更多的特征，而不是单一的。n代表特征的数量。X（i）代表第i个特征实例，是特征矩阵中的第i行，是个向量。代表特征矩阵中的第i行中的第j个特征。支持多变量的假设h可以表示为：有n+1个参数和n个变量，为了方便我们使x0=1，则公式转化为：此时，模型中参数为n+1维向量，特征矩阵X的维度使m*（n+1），公式可以简化为：4.2 多变量梯度下降在多变量线性回归中，我们构建一个代...]]></description><category></category></item><item><title><![CDATA[机器学习吴恩达第二章上 单变量线性回归]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/80867753</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/80867753</guid><author>Barbie_1229</author><pubDate>Sat, 30 Jun 2018 18:48:24 +0800</pubDate><description><![CDATA[2.1 模型表示第一个算法是线性回归算法。在监督学习中，数据集被称为训练集。m代表训练样本的数目。x代表特征/输入变量y代表目标/输出变量（x，y）代表训练集中的实例（x（i），y（i））代表第i个观察实例h代表学习算法的解决方案或函数，也称为假设（hypothesis）如图所示，训练集是房屋的价格，我们输入了房屋的面积x，h表示一个函数，映射出房屋的价格y。而我们要考虑的问题是如何表达h。一种可...]]></description><category></category></item><item><title><![CDATA[机器学习吴恩达第一章 引言]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/80849623</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/80849623</guid><author>Barbie_1229</author><pubDate>Thu, 28 Jun 2018 22:23:42 +0800</pubDate><description><![CDATA[1.1 欢迎1.2 机器学习是什么一个程序被认为能从经验E中学习，解决任务T，达到性能度量值P，当且仅当，有了经验E后，经过P评判，程序在处理T时的性能有所提升。以下棋举例，E是程序上万次的自我练习的经验；T是任务下棋；P是赢得比赛的概率。主要的两类算法为：监督学习和无监督学习。1.3 监督学习经典例子：预测房价横轴表示房子的面积，单位是平方英尺，纵轴表示房价，单位是千美元。那基于这组数据，假如你...]]></description><category></category></item><item><title><![CDATA[Leetcode95. Unique Binary Search Trees II]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79217080</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79217080</guid><author>Barbie_1229</author><pubDate>Wed, 31 Jan 2018 14:40:37 +0800</pubDate><description><![CDATA[Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below. 
   1 ]]></description><category></category></item><item><title><![CDATA[Leetcode96. Unique Binary Search Trees]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79214670</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79214670</guid><author>Barbie_1229</author><pubDate>Wed, 31 Jan 2018 11:16:23 +0800</pubDate><description><![CDATA[Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's. 
   1         3     3      2      1
    \  ]]></description><category></category></item><item><title><![CDATA[Leetcode94. Binary Tree Inorder Traversal]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79209402</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79209402</guid><author>Barbie_1229</author><pubDate>Tue, 30 Jan 2018 18:41:34 +0800</pubDate><description><![CDATA[Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree [1,null,2,3],

   1
    \
     2
    /
   3


return [1,3,2]. 
非常简单的中序遍历，都AC以后才弄明白说可不可以用迭代]]></description><category></category></item><item><title><![CDATA[Leetcode31. Next Permutation]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79196819</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79196819</guid><author>Barbie_1229</author><pubDate>Mon, 29 Jan 2018 16:30:02 +0800</pubDate><description><![CDATA[Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
If such arrangement is not possible, it must rearrange it as the lowest possible o]]></description><category></category></item><item><title><![CDATA[Leetcode35. Search Insert Position]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79190098</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79190098</guid><author>Barbie_1229</author><pubDate>Sun, 28 Jan 2018 22:10:43 +0800</pubDate><description><![CDATA[Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You may assume no duplicates in the array.
]]></description><category></category></item><item><title><![CDATA[剑指Offer面试题4：二维数组中的查找]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79188782</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79188782</guid><author>Barbie_1229</author><pubDate>Sun, 28 Jan 2018 19:35:07 +0800</pubDate><description><![CDATA[在一个二维数组中，每一行都按照从左到右递增的顺序排序，每一列都按照从上到下递增的顺序排序。请完成一个函数，输入这样的一个二维数组和一个整数，判断数组中是否含有该整数。
#include
using namespace std;
bool found(int* matrix, int rows, int columns, int num)
{
	bool find = false;
	if (ma]]></description><category></category></item><item><title><![CDATA[剑指Offer 面试题3.数组中重复的数字]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79186956</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79186956</guid><author>Barbie_1229</author><pubDate>Sun, 28 Jan 2018 17:10:39 +0800</pubDate><description><![CDATA[找出数组中重复的数字

在一个长度为n的数组里的所有数字都在0到n-1的范围内。 数组中某些数字是重复的，但不知道有几个数字是重复的。也不知道每个数字重复几次。请找出数组中任意一个重复的数字。
例如，如果输入长度为7的数组{2,3,1,0,2,5,3}，那么对应的输出是重复的数字2或者3。
有几个思路来解决这个问题：
1.排序
这是最直接的方法，然后从头到尾扫描就可以了，时间复杂度：O]]></description><category></category></item><item><title><![CDATA[Leetcode27. Remove Element]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79175770</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79175770</guid><author>Barbie_1229</author><pubDate>Fri, 26 Jan 2018 18:56:59 +0800</pubDate><description><![CDATA[Given an array and a value, remove all instances of that value 
in-place and return the new length.

Do not allocate extra space for another array, you must do this by modifying the input array

]]></description><category></category></item><item><title><![CDATA[26. Remove Duplicates from Sorted Array]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79175713</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79175713</guid><author>Barbie_1229</author><pubDate>Fri, 26 Jan 2018 18:49:51 +0800</pubDate><description><![CDATA[Given a sorted array, remove the duplicates 
in-place such that each element appear only
once and return the new length.
Do not allocate extra space for another array, you must do this by modifying]]></description><category></category></item><item><title><![CDATA[Leetcode18. 4Sum]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79175567</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79175567</guid><author>Barbie_1229</author><pubDate>Fri, 26 Jan 2018 18:27:57 +0800</pubDate><description><![CDATA[Given an array S of n integers, are there elements a,
b, c, and d in S such that a + b +
c + d = target? Find all unique quadruplets in the array which gives the sum of target.
Note: The solution s]]></description><category></category></item><item><title><![CDATA[Leetcode16. 3Sum Closest]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79175406</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79175406</guid><author>Barbie_1229</author><pubDate>Fri, 26 Jan 2018 18:08:20 +0800</pubDate><description><![CDATA[Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly]]></description><category></category></item><item><title><![CDATA[Leetcode15. 3Sum]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79173620</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79173620</guid><author>Barbie_1229</author><pubDate>Fri, 26 Jan 2018 16:09:21 +0800</pubDate><description><![CDATA[Given an array S of n integers, are there elements a,
b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note: The solution set must not contain du]]></description><category></category></item><item><title><![CDATA[Leetcode11. Container With Most Water]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79172971</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79172971</guid><author>Barbie_1229</author><pubDate>Fri, 26 Jan 2018 15:30:33 +0800</pubDate><description><![CDATA[Given n non-negative integers a1, a2, ...,
an, where each represents a point at coordinate (i, 
ai). n vertical lines are drawn such that the two endpoints of line
i is at (i, ai) and (i, 0). Find ]]></description><category></category></item><item><title><![CDATA[Leetcode1.Two Sum]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/79162009</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/79162009</guid><author>Barbie_1229</author><pubDate>Thu, 25 Jan 2018 15:04:29 +0800</pubDate><description><![CDATA[又回来刷题了，小一个月被各种事情耽误没有写代码，再写的时候完全手生。
接下来的时间要全身心准备年后的各种内推，希望3月能去一个好公司实习。
无他，唯手熟尔。
这题还是挺简单的，我第一反应就是用双循环，不过确实时间效率并不高，看了一下百度上的各种答案，有的用双指针和map的hash，没太详细看，慢慢来，毕竟这种简单题命中率并不高

Given an array of integers, r]]></description><category></category></item><item><title><![CDATA[19. Remove Nth Node From End of List]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/78875117</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/78875117</guid><author>Barbie_1229</author><pubDate>Fri, 22 Dec 2017 17:03:18 +0800</pubDate><description><![CDATA[Given a linked list, remove the nth node from the end of list and return its head.
For example,
   Given linked list: 1->2->3->4->5, and n = 2.

   After removing the second node from the end, the l]]></description><category></category></item><item><title><![CDATA[Leetcode21. Merge Two Sorted Lists]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/78868658</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/78868658</guid><author>Barbie_1229</author><pubDate>Thu, 21 Dec 2017 22:55:50 +0800</pubDate><description><![CDATA[Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
Example: 
Input: 1->2->4, 1->3->4
Output: 1->1->2->3->4-]]></description><category></category></item><item><title><![CDATA[Leetcode237. Delete Node in a Linked List]]></title><link>https://blog.youkuaiyun.com/Barbie_1229/article/details/78867330</link><guid>https://blog.youkuaiyun.com/Barbie_1229/article/details/78867330</guid><author>Barbie_1229</author><pubDate>Thu, 21 Dec 2017 20:15:18 +0800</pubDate><description><![CDATA[Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.
Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value
]]></description><category></category></item></channel></rss>