自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(188)
  • 资源 (2)
  • 收藏
  • 关注

原创 写在入职之前

25号即将入职ZTE,带着对结束学生时代的不甘与从此经济独立的欣慰。在这个年纪,承受着比任何时候都多的压力,承担着比任何时候都多的责任。该学习的实在太多,不仅是知识积累,还有思维方式的锻炼,这一切,会在未来几十年的工作中决定我一生的高度吧。假期还有10天,还有什么想交代的后面再做补充。

2016-05-14 22:23:45 535

原创 python 3.5 写的爬虫

debug一晚上,终于把爬虫软件终于可以用了。明天修改后上代码。

2016-03-23 22:17:07 761

原创 Python OS 模块操作整理

一.os的简介os模块可以对不同的系统进行系统编程>>> import os #导入os模块>>> help(os) #查看os功能(内容太多,推荐使用标准库Python 3.5.1 介绍OS的链接   大概有43页,有时间再全部看一遍二.os的常用方法(3.5.1)os.sep可以取代操作系统特定的路径分隔符。windows下为 “

2016-03-06 20:58:34 613

原创 研三上学习计划

工作已经找完,后面就要忙碌着写论文,改论文。一直想给自己找点时间充充电,期待着进入工作岗位可以大展宏图。在这里给自己列一个简单的计划表,在2015年的最后两个月。1.python2.(谈恋爱)3.搞一个可以记录自己文章网站。4.上线一款android APP。

2015-10-31 21:55:23 1051

原创 2015 毕业秋招感慨

多了如此多年的书,其实就是为了找一份好工作。找工作并不是一个顺利的过程,运气,实力,毅力,这是堪比高考,考研的一场战斗。有的同学找了一个工作一玩就是两个月,有的同学,苦苦得找了两个月,却一无所获。人生并不因为现在一个选择而彻底界定,未来的路还远着。但是一定不要被生活妥协,做自己想做的事情。也希望几年的自己能收获一个满意的结局。

2015-10-18 13:54:30 453 1

原创 mysql允许远程访问 root

>GRANT ALL PRIVILEGES ON *.*TO 'root'@'%' IDENTIFIEDBY '123456' WITH GRANT OPTION;>FLUSHPRIVILEGES

2015-09-05 11:04:04 1150

原创 Linux下出现 error: mysql.h: No such file or directory 的解决办法

在linux 下使用C语言调用 mysql的库会出现找不到 mysql.h 的错误,解决办法如下在使用GCC编译的时候,加上如下几句需要在gcc编译时指定 头文件地址,用命令mysql_config,即可获取mysql安装后头文件所在位置,库文件所在位置,之后指定相关路径。-I /usr/include/mysql,同时需要指定mysql的库文件, 搜索目录为:-L /

2015-08-29 09:18:26 18172

原创 leetcode 162 —— Find Peak Element

A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks, i

2015-08-23 15:51:31 335

原创 leetcode 160 —— Intersection of Two Linked Lists

Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘

2015-08-23 15:40:50 244

原创 leetcode 155 —— Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get

2015-08-22 13:37:56 237

原创 leetcode 154 —— Find Minimum in Rotated Sorted Array II

Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Suppose a sorted array is rotated at some pivot u

2015-08-22 12:53:09 320

原创 leetcode 153 —— Find Minimum in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplicate exists in

2015-08-22 12:41:46 284

原创 二进制中1的个数

public class Solution { public int countOnes(int num) { int a=1; int cnt=0; while(num>0){ if((num&a)!=0){ cnt++; } num=num>>1; } return cnt; }

2015-08-18 20:28:02 283

原创 二叉树的最大深度

public class Solution { public int cur=0; public int maxDepth(TreeNode root) { if(root==null){ return cur; } cur++; int left=maxDepth(root.left); int right=maxD

2015-08-18 19:31:47 304

原创 落单的数

思路:按位异或public class Solution { /** *@param A : an integer array *return : a integer */ public int singleNumber(int[] A) { if (A.length == 0) { return 0; } int n = A[0]; for(int

2015-08-18 18:57:09 299

原创 leetcode 152 —— Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the largest

2015-08-18 16:46:19 298

原创 leetcode 151 —— Reverse Words in a String

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C programmers: Try to solve it in-place in

2015-08-18 16:18:18 366

原创 Fizz Buzz

题目:给你一个整数n. 从 1 到 n 按照下面的规则打印每个数:如果这个数被3整除,打印fizz.如果这个数被5整除,打印buzz.如果这个数能同时被3和5整除,打印fizz buzz.样例比如 n = 15, 返回一个字符串数组:["1", "2", "fizz", "4", "buzz", "fizz", "7", "8", "fizz",

2015-08-18 15:16:35 954

原创 leetcode 150 —— Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: ["2", "1",

2015-08-18 09:16:33 291

原创 leetcode 149 —— Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.思路

2015-08-17 16:34:18 267

原创 leetcode 148 —— Sort List

Sort a linked list in O(n log n) time using constant space complexity.思路:

2015-08-17 13:38:42 348

原创 leetcode 147 —— Insertion Sort List

Sort a linked list using insertion sort.思路:插入排序,从今天起,养成良好的编程风格class Solution {public: ListNode* insertionSortList(ListNode* head) { if (head == nullptr || head->next == nullptr) return he

2015-08-17 10:47:38 251

原创 leetcode 146 —— LRU Cache

思路:hash_map 和list 容器class LRUCache{public: struct node{ int key; int value; node(int k, int v) :key(k), value(v){} }; LRUCache(int capacity) { mCapacity = capacity; } int get(int key)

2015-08-16 18:31:53 588

原创 leetcode 145 —— Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].Note: Recursive solut

2015-08-16 13:48:39 285

原创 leetcode 144 —— Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Recursive soluti

2015-08-16 12:59:34 346

原创 leetcode 143 —— Reorder List

Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, reorder it to 

2015-08-16 12:15:33 460

原创 leetcode 142 —— Linked List Cycle II

思路: 数学推导,第一次相遇之后,left回到head,left和right 同时同速往后遍历,相遇时则为循环节点。推导见此处http://www.cnblogs.com/x1957/p/3406448.htmlhttp://www.cnblogs.com/ballwql/p/3676843.htmlclass Solution {public: ListNode *det

2015-08-16 10:22:47 349

原创 leetcode 141 —— Linked List Cycle

Given a linked list, determine if it has a cycle in it.  Follow up: Can you solve it思路 :两个指针,一个每次移动一位,一个每次移动两位,最终如果相遇说明有环class Solution {public: bool hasCycle(ListNode *head) { if (!head)

2015-08-16 09:39:27 258

原创 leetcode 140 —— Word BreakII

思路:

2015-08-16 09:25:30 284

原创 leetcode 139 —— Word Break

Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "leetcode",dict = ["leet"

2015-08-14 20:37:43 267

原创 leetcode 138 —— Copy List with Random Pointer

A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.思路:用map存储自己和拷贝,今天看到基友的代码class

2015-08-14 19:48:12 227

原创 leetcode 137 —— Single Number II

Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without usi

2015-08-14 15:45:20 232

原创 leetcode 136 —— Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using ext

2015-08-14 10:24:41 191

原创 leetcode 135 —— Candy

There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least on

2015-08-14 10:16:14 285

原创 leetcode 134 —— Gas Station

There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to

2015-08-13 19:56:43 264

原创 leetcode 133 —— Clone Graph

Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as a separator for ea

2015-08-13 19:21:29 319

原创 leetcode 132 —— Palindrome Partitioning II

Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.For example, given s = "aab",Return

2015-08-13 17:18:26 293

原创 leetcode 131 —— Palindrome Partitioning

Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example, given s = "aab",Return [ ["aa","

2015-08-13 14:11:38 289

原创 leetcode 130 —— Sum Root to Leaf Numbers

Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrounded region.For example,X X X XX O O X

2015-08-13 13:16:59 213

原创 leetcode 129 —— Sum Root to Leaf Numbers

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find the tota

2015-08-12 15:13:05 261

python 3 手册

python 3 手册,排版清晰,大家一起分享学习。

2016-02-19

LY-51S V2.3开发板说明书

德飞来单片机开发板的资料文档,需要详细资料的可以私信我

2013-10-14

空空如也

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

TA关注的人

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