自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (9)
  • 收藏
  • 关注

原创 424. Longest Repeating Character Replacement

public class Solution { public int characterReplacement(String s, int k) { int start=0; int end=0; int maxlength=0; int len=s.length(); int[] count=new int[2

2017-02-13 14:12:11 290

原创 423. Reconstruct Original Digits from English

public class Solution { public String originalDigits(String s) { int[] count = new int[10]; for (int i = 0; i < s.length(); i++){ char c = s.charAt(i); if (c

2017-02-13 10:20:12 284

原创 421. Maximum XOR of Two Numbers in an Array

class Solution {public: int findMaximumXOR(vector<int>& nums) { int max=0; int mask=0; unordered_set<int> s; for(int i=31;i>=0;i--) { s.clear();

2017-02-12 12:08:35 266

原创 419. Battleships in a Board

public class Solution { public int countBattleships(char[][] board) { int m=board.length; if(m==0) return 0; int n=board[0].length; if(n==0)

2017-02-10 16:01:43 310

原创 417. Pacific Atlantic Water Flow dfs

public class Solution { public List<int[]> pacificAtlantic(int[][] matrix) { List<int[]> ret=new ArrayList<int[]>(); int m=matrix.length; if(m==0) return ret;

2017-02-09 19:05:23 273

原创 417. Pacific Atlantic Water Flow

public class Solution { public List<int[]> pacificAtlantic(int[][] matrix) { List<int[]> ret=new ArrayList<int[]>(); int m=matrix.length; if(m==0) return ret;

2017-02-09 16:00:09 331

原创 Principal Component Analysis

pca的目标是通过基变换 使得元素的方差从大到小排列 并且元素之间的协方差为0(线性无关)。而元素的协方差 矩阵的对角线上是元素的方差 ,对角线外的元素是协方差。 我们的目标就是 找到单位正交基,使得通过基变换后 ,元素的方差从大到小排列 而不同元素的协方差为0 。元素的协方差矩阵 和经过基变换后的协方差矩阵关系如下 原数据为X X的协方差矩阵为C Y=PX P为变换矩阵 Y为变换后的元

2017-02-08 20:41:42 379

原创 416. Partition Equal Subset Sum

public class Solution { public boolean canPartition(int[] nums) { int sum=0; for(int num:nums) { sum+=num; } if(sum%2==1) return false;

2017-02-08 15:56:43 320

原创 415. Add Strings

public class Solution { public String addStrings(String num1, String num2) { int carry=0; StringBuilder sb=new StringBuilder(); for(int i=num1.length()-1,j=num2.length()-1;i

2017-02-08 11:22:17 309

原创 414. Third Maximum Number

public class Solution { public int thirdMax(int[] nums) { Integer max1=null; Integer max2=null; Integer max3=null; for(Integer num:nums) { if(num

2017-02-07 14:35:44 325

原创 413. Arithmetic Slices

class Solution {public: int numberOfArithmeticSlices(vector<int>& A) { int n=A.size(); if(n<3) return 0; vector<int> dp(n,0);//dp[i]表示以i结尾的等差数列的个数 if(A[

2017-02-07 13:48:03 264

原创 412. Fizz Buzz

class Solution {public: vector<string> fizzBuzz(int n) { vector<string> ret; for(int i=1;i<=n;i++) { bool timeofthree=(i%3==0); bool timeoffive=(i%5

2017-02-07 10:57:08 237

原创 410. Split Array Largest Sum

class Solution {private: bool valid(int target,vector<int>& nums,int m) { int count=1;//count应该初始化1 int total=0; for(int num:nums) { total+=num;

2017-02-06 15:08:51 276

原创 409. Longest Palindrome

class Solution {private: bool static compare(int a,int b) { return a>b; }public: int longestPalindrome(string s) { map<char ,int > m; for(int i=0;i<s.size();i+

2017-02-06 10:48:17 220

原创 03. Frog Jump

public class Solution { public boolean canCross(int[] stones) { HashMap<Integer,HashSet<Integer>> map=new HashMap<>(); map.put(stones[0], new HashSet<Integer>()); map.get(st

2017-02-01 15:22:25 216

PID算法详解

过程控制中,按偏差的比例(P)、积分(I)和微分(D)进行控制的PID控制器(亦称PID调节器)是应用最为广泛的一种自动控制器。它具有原理简单,易于实现,适用面广,控制参数相互独立,参数的选定比较简单等优点;而且在理论上可以证明,对于过程控制的典型对象──“一阶滞后+纯滞后”与“二阶滞后+纯滞后”的控制对象,PID控制器是一种最优控制。PID调节规律是连续系统动态品质校正的一种有效方法,它的参数整定方式简便,结构改变灵活(PI、PD、…)。

2013-04-18

三天入门M4——Kinetis(V2.2)

三天入门M4 手把手教你如何进入CORTEX——M4

2013-04-18

电磁组直立行车参考设计方案

电磁组直立行车参考设计方案 提拱了如何控制小车直立和行进的完整解决方案

2013-04-18

PID算法介绍

pid算法是用于反馈控制的算法 适合于工业控制

2012-10-07

数字电路教程

很好的数字电路入门资源,非常适合入门 数字电路是基础哦

2012-09-23

TMP100驱动

温度传感器TMP100的驱动代码,可以直接拿过来用的

2012-09-18

安卓开发门必读

安卓开发必读 Android

2012-05-13

空空如也

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

TA关注的人

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