- 博客(198)
- 收藏
- 关注
原创 笔记
1. 直方图均衡化2. 堆和栈的区别3. 超分辨率4. resnet,vgg,google net5. 过拟合6. faster-rcnn bouding box regression
2021-03-02 20:18:43 155 1
原创 K数之和为指定数
leetcode15:https://leetcode-cn.com/problems/3sum/class Solution {public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> ret; int n = nums.size(); if(n < 3) .
2021-01-23 22:35:54 167
原创 leetcode链表反转
leetcode92:https://leetcode-cn.com/problems/reverse-linked-list-ii//** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(.
2021-01-23 22:05:17 150
原创 leetcode二分查找总结
leetcode33:https://leetcode-cn.com/problems/search-in-rotated-sorted-array/submissions/class Solution {public: int search(vector<int>& nums, int target) { int n = nums.size(); if(n == 0) { return -.
2021-01-23 21:52:20 147
原创 leetcode92. 反转链表 II
link:https://leetcode-cn.com/problems/reverse-linked-list-ii//** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: //思.
2021-01-16 15:00:05 74
原创 leetcode697. Degree of an Array
url :https://leetcode.com/problems/degree-of-an-array/Description:Given a non-empty array of non-negative integersnums, thedegreeof this array is defined as the maximum frequency of any one of ...
2019-03-11 22:40:31 143
原创 leetcode167. Two Sum II - Input array is sorted
网址url:https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/Given an array of integers that is alreadysorted in ascending order, find two numbers such that they add up to a specific target...
2019-03-09 14:36:39 127
原创 leetcode169. Majority Element
题目链接:https://leetcode.com/problems/majority-element/题目描述:Given an array of sizen, find the majority element. The majority element is the element that appearsmore than⌊ n/2 ⌋times.You may a...
2019-03-09 13:16:37 127
原创 leetcode448. Find All Numbers Disappeared in an Array
题目链接:https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/题目描述:Given an array of integers where 1 ≤ a[i] ≤n(n= size of array), some elements appear twice and others appear onc...
2019-03-06 23:04:02 118
原创 leetcode283. Move Zeroes
题目链接:https://leetcode.com/problems/move-zeroes/题目描述:Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.Example:...
2019-03-05 23:37:00 119
原创 leetcode896. Monotonic Array
题目链接:https://leetcode.com/problems/monotonic-array/题目描述:给定一个数组,判断该数组元素是不是单调的。解题思路:设置两个标志,一个标志代表该数组递减,另一个代表该数组递增,遍历整个数组即可。代码:class Solution {public: bool isMonotonic(vector<int&g...
2019-03-04 23:45:58 145
原创 leetcode888. Fair Candy Swap
description:Alice and Bob have candy bars of different sizes:A[i]is the size of thei-th bar of candy that Alice has, andB[j]is the size of thej-th bar of candy that Bob has.Since they are fr...
2019-03-04 22:05:44 117
原创 leetcode976. Largest Perimeter Triangle
url:https://leetcode.com/problems/largest-perimeter-triangle/description:Given an arrayAof positive lengths, return the largest perimeter of a triangle withnon-zero area, formed from 3 of these...
2019-03-02 17:49:11 199
原创 leetcode566. Reshape the Matrix
Description:In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data.You're given a matrix represented ...
2019-03-02 17:39:03 167
原创 leetcode766.Toeplitz Matrix
Description:A matrix isToeplitzif every diagonal from top-left to bottom-right has the same element.Now given anM x Nmatrix, returnTrueif and only if the matrix isToeplitz.demo:Input:mat...
2019-03-02 16:28:00 156
原创 leetcode 509. Fibonacci Number
比较经典的算法题,Fibonacci序列:solution 1 :递归class Solution {public: int fib(int N) { if(N<=1){ return N; } return fib(N-1) + fib(N-2); }};soluti...
2019-03-02 15:39:37 123
原创 leetcode 977. Squares of a Sorted Array
题目链接:https://leetcode.com/problems/squares-of-a-sorted-array/题目描述:Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-dec...
2019-02-27 00:09:03 153
原创 keras学习笔记(2)
今天学习一下keras的数据增强,在深度学习中,经常面临数据集不足的情形,这时候,需要进行数据集的扩充,常用的方法就是数据集增强。from keras.preprocessing.image import ImageDataGeneratorfrom keras.preprocessing import imageimport matplotlib.pyplot as pltimpor...
2019-01-20 15:26:46 222
原创 keras学习笔记(一)
最近在学习keras,首先学习经典的手写数字体分类 import keraskeras.__version__from keras import layersfrom keras import modelsmodel = models.Sequential()model.add(layers.Conv2D(32, (3, 3), activation='relu', input_...
2019-01-17 23:00:06 188
转载 python中collections模块
https://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001411031239400f7181f65f33a4623bc42276a605debf6000
2018-10-14 13:16:46 331
原创 《deep learning》读书笔记------第六章
1.Feedforward Deep Networks 前向神经网络即感知机(MLP);
2017-12-20 15:34:09 418
原创 C++的模版类
1.不能将模版类的成员函数放在独立的实现文件中,必须将声明和定义放在一起。以前可以用export关键字,现在不行了。如下面的例子。#ifndef STACKP_H_#define STACKP_H_template {private: enum{MAX=10}; Type items[MAX]; int top;public: Stack(); bool isempty
2017-09-06 21:53:35 420
原创 深度学习的知识点总结
看了deeplearning.ai,一些笔记1.relu函数的左边部分为0怎么修改?2.逻辑回归为什么不采用平方误差损失函数?参数过多的时候,是非凸函数,存在很多局部最优解。如果采用梯度下降,不会得到全局最优解。
2017-09-03 22:06:50 609
原创 C++实现一个string类
#includeusing namespace std;class String{private: char * m_data;public: String(char *data); ~String(); String(const String& str); String& operator =(const String& str);};Str
2017-09-02 14:36:39 262
原创 20170901面试问题记录
某互联网公司:1.简单介绍一下自己,巴拉巴拉介绍完,介绍项目深度学习的优化的时候,如何进行优化?正则化的方法,L1正则化不可导的地方如何求导旋转数组的二分查找不想写了,四点还有面试,求offer啊
2017-09-01 14:25:58 282
原创 leetcode之链表
141. Linked List Cycle题目描述:给定一个链表,看看是否有环。解题思路:方法1:hash存储每一个节点的地址,看看是否有重复。缺点:消耗额外的空间。代码:/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next;
2017-08-28 11:06:03 357
原创 leetcode之排序题目总结
之前总结过排序的方法,在这里在写一下快速排序。快速排序的本质就是分治算法,先找到该元素的正确位置,然后再将两边的元素递归进行快速排序。代码如下:int partition(vector&nums,int left,int right){ int temp=nums[left]; while(left<right) { while(left=te
2017-08-24 13:30:25 744
原创 面试题目
局部最优解方法,梯度下降,牛顿迭代,区别,深度学习为什么不用牛顿迭代全局最优的方法:方差与偏差的区别SVM与LR的区别, 损失函数的区别随机森林与ADBOOST的方差与偏差的区别防止过拟合的方法;L!与L2的区别,为什么旋转不变特征:sift为什么具有旋转不便特征边缘检测方法CNN 防止过拟合的方法:drop out ,batch normalization
2017-08-11 15:35:38 397
原创 leetcode之分治总结
169. Majority Element题目描述:给定一个数组,求该数组中出现超过一半的数字。解题思路:Moore Voting代码如下:class Solution {public: int majorityElement(vector& nums) { int candidate=nums[0]; int ret=1;
2017-08-05 12:12:26 412
原创 leetcode之DP总结
303. Range Sum Query - Immutable解题思路:给定一个数组,计算给定区间的数字的和。利用DP算出从开始处到i的和,dp[i]=sum[i],代码如下:class NumArray {public: NumArray(vector nums) { sum.push_back(0); for(int i=0;i<n
2017-07-29 22:51:39 919
原创 传统图像处理的一些特征
1.LBP(Local binary pattern)局部二值模式,是一种用来描述图像局部纹理特征的算子;它具有旋转不变性和灰度不变性等显著的优点。用于纹理特征提取。而且,提取的特征是图像的局部的纹理特征,对灰度(线性光照)不敏感。关于LBP的博客:知乎,CSDN.2.方向梯度直方图(Histogram of Oriented Gradient, HOG)特征是一种在计算机视觉和图像处
2017-07-27 22:59:47 2924
原创 排序算法之再总结
马上找工作了,在写一遍经典的排序算法//the summary of sort by suqiang#include #include using namespace std;void swap(int &x, int &y){ int temp = x; x = y; y = temp;}//Select Sort,O(n*n)void selectSort(int
2017-07-24 17:29:30 206
原创 知识点总结
1.二叉树线索化2.哈夫曼树3.哈希冲突解决方法:1.开放地址法 2.线性探测法 3.链地址法(拉链法) 4.二次探测法5.伪随机探测法 6.再散列(双重散列,多重散列) 7.建立一个公共溢出区单旋转法是建立散列函数的一种方法, ,将最后一位数,旋转放置到第一位常见的散列函数有,直接定址法,数字分析法,平法取中法,取余法,折叠法,随机法
2017-07-07 10:57:22 236
原创 leetcode之二叉树(easy)
404. Sum of Left LeavesFind the sum of all left leaves in a given binary tree.Example: 3 / \ 9 20 / \ 15 7There are two left leaves in the binary tree, with values 9 a
2017-07-06 22:00:58 287
原创 leetcode之贪心算法
455. Assign CookiesAssume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which
2017-07-05 11:27:15 371
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人