自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 【leetcode】26. Remove Duplicates from Sorted Array

Given a sorted array nums, 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 modifyi...

2019-04-01 21:23:34 125

原创 【leetcode】14. Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Example 1:Input: ["flower","flow","flight"]Output:...

2019-04-01 18:08:47 128

原创 【leetcode】13. Roman to Integer-levle:simple

描述:将罗马数字转成整数

2019-03-30 21:42:17 101

原创 【记录】tensorflow报错DLL load failed:找不到指定程序

更新anoconda后出现了版本不兼容情况,keras不能正常使用,更新了tensorflow后测试报错如下:解决方法如提示:protobuf 这个库版本不兼容,按搜索到的方法将重新安装指定版本即可。命令如下:pip install protobuf==3.6.0总结:在网上搜索的时候出现了很多类似的报错,重点是看traceback里的提示,找到相关包的问题。 参考博文:...

2018-09-25 23:28:21 2275 1

原创 【每日一题Leetcode】-169. Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element alwa...

2018-08-24 12:31:01 127

原创 【每日一题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 ↘ ...

2018-08-23 12:29:13 113

原创 【每日一题Leetcode】155. 最小 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() -- Ge...

2018-07-31 23:29:46 139

原创 【每日一题Leetcode】-2. Add Two Numbers

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i...

2018-07-25 16:07:10 205

原创 【每日一题leetcode】-141 Linked List Cycle

Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?由于最开始没有弄清楚链表中循环可以从任何位置开始,判断条件是是否tail的值等于head。但是这个题是判断一个链表中是否存在有环,因此这个循环的起始位置是未知的。所以改变了思...

2018-07-23 15:00:00 110

原创 【每日一题Leetcode】9. Palindrome Number

Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExpl...

2018-07-19 22:37:06 114

原创 【每日一题Leetcode】7. Reverse Integer

不太喜欢这个题,主要考虑的点是溢出问题。Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21N...

2018-07-18 12:25:58 95

原创 【每日一题Leetcode】-136. Single Number

Given a non-empty 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 ...

2018-07-12 16:34:15 205

原创 【每日一题Leedcode】121. Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), d...

2018-07-04 16:33:47 132

原创 【每日一题Leetcode】104. Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Note: A leaf is a node with no children.Ex...

2018-07-02 13:35:32 91

原创 【每日一题Leetcode】101Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the...

2018-06-29 14:47:33 135

原创 【每日一题Leetcode】100. Same Tree

Given two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical and the nodes have the same value.Example 1:In...

2018-06-28 16:39:34 101

原创 【每日一题leetcode】70 Climbing Stairs

这道题花了蛮久时间,刚开始接触DP,需要多一些思维训练。 题目: **You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the t...

2018-06-27 17:18:56 647

原创 【每日一题leetcode】53. Maximum Subarray

Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example:Input: [-2,1,-3,4,-1,2,1,-5,4],Output: 6Explan...

2018-06-25 17:54:54 201

原创 【每日一题leetcode】Merge Two Sorted Lists

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->4Output: 1->1...

2018-06-25 14:40:39 135

原创 【每日一题leetcode】Search Insert Position

继续把知乎发的挪到这里https://zhuanlan.zhihu.com/p/38404527题目: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 o...

2018-06-25 14:40:01 84

原创 【每日一题Leetcode】Valid Parentheses

继续搬https://zhuanlan.zhihu.com/p/36414513Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input string is valid if:Open brackets ...

2018-06-25 14:38:17 101

原创 【每日一题Leetcode】LeetCode-3. Longest Substring Without Repeating Characters

给刷题日常换个窝  搬自https://zhuanlan.zhihu.com/p/36340355今天的题目是给定一个字符串,返回无重复字符的最长子串Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b", with the length of 1....

2018-06-25 14:33:36 77

原创 深度学习-正则化

常用来防止过拟合的正则方法:L1 L2正则 L2是较常用的正则法,因其公式特性尽可能的考虑到了每一个特征。而L1是绝对值合,结果常常是一个稀疏矩阵。 在NN里,常用正则项 “Frobenius norm”J(w[1],b[1]...w[l],b[l])=1m∑ni=1L(y^(i),y)+λ2m∑ℓℓ=1∥W[ℓ]∥2FJ(w^{[1]},b^{[1]}...w^{[l]},b^{[l]})=\

2017-11-02 21:06:03 562

原创 机器学习笔记一:线性回归

“回归”一词的来历:  原本是用来根据双亲的身高预测其一下代的身高,如果双亲高度高于平均值,其子女身高也倾向于比平均值高,但低于双亲身高。而双亲身高低于平均值的,子女身高倾向于比均值低,但是高于双亲身高。 预测值的两类都倾向于回归到均值,而不是与父母身高相同。Galton在多项研究中都注意到了这个现象。后来用这种方式来寻找一堆测量数据点的数学关系,而不是均值回归,但这种方法仍被称为回归。虽然这个单词

2017-07-05 18:33:20 438

原创 电脑蓝屏0x000024解决记录

电脑突然不能正常打开cousera网站,其他操作也变慢,杀毒的时候突然蓝屏。提示如下图解决方法:删除近期安装的软件及补丁。重启后,恢复正常,网站也能正常打开~附加问题:1.office不能正常使用。安装包删除提示语言不支持,更改语言设置无效。    解决方法:下载office删除软件windows install clean up。该软件删除不完全。2.重新安装时报

2017-07-03 18:39:58 6207

空空如也

空空如也

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

TA关注的人

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