7 IT莫莫

尚未进行身份认证

暂无相关简介

等级
TA的排名 7w+

45. Jump Game II

Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your goal is to...

2019-07-13 06:31:40

41. First Missing Positive

Given an unsorted integer array, find the smallest missingpositive integer.Example 1:Input: [1,2,0]Output: 3Example 2:Input: [3,4,-1,1]Output: 2Example 3:Input: [7,8,9,11,12]Outpu...

2019-07-11 09:43:18

40. Combination Sum II

Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations incandidateswhere the candidate numbers sums totarget.Each number incandidatesmay...

2019-07-08 13:36:44

python append 与 拷贝

python中的赋值操作是赋值的索引,例如:a=[1,2,3]b=[]b.append(a)a.pop()print(b)#[[1, 2]]当a数组弹出一个元素后,b也会跟着改变。但是对a重新赋值会给a一个新的内存地址:a=[1,2,3]b=[]b.append(a)a=a[:len(a)-1]print(b)#[[1, 2, 3]]虽然对a的再次赋值是...

2019-07-08 11:47:24

39. Combination Sum

Given asetof candidate numbers (candidates)(without duplicates)and a target number (target), find all unique combinations incandidateswhere the candidate numbers sums totarget.Thesamerepeat...

2019-07-08 11:18:00

36. Valid Sudoku

Determine if a9x9 Sudoku boardis valid.Only the filled cells need to be validatedaccording to the following rules:Each rowmust contain thedigits1-9without repetition. Each column must conta...

2019-06-30 11:58:40

35. Search Insert Position

You may assume no duplicates in the array.Example 1:Input: [1,3,5,6], 5Output: 2Example 2:Input: [1,3,5,6], 2Output: 1Example 3:Input: [1,3,5,6], 7Output: 4Example 4:Input: [...

2019-06-30 10:59:31

34. Find First and Last Position of Element in Sorted Array

Given an array of integersnumssorted in ascending order, find the starting and ending position of a giventargetvalue.Your algorithm's runtime complexity must be in the order ofO(logn).If the...

2019-06-30 06:08:06

Leetcode 33. Search in Rotated Sorted Array

Suppose an array sorted in ascending order 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]).You are given a target value to search. If found ...

2019-04-08 12:42:45

Leetcode 32. Longest Valid Parentheses

Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.Example 1:Input: "(()"Output: 2Explanation: The longest valid...

2019-04-08 12:30:55

Leetcode 152. Maximum Product Subarray

Given an integer arraynums, find the contiguous subarray within an array (containing at least one number) which has the largest product.Example 1:Input: [2,3,-2,4]Output: 6Explanation:[2,3] h...

2019-03-29 11:47:16

Leetcode 31. Next Permutation

Implementnext 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...

2019-03-29 06:12:30

Keras 可视化

Keras可视化需要安装pydot和graphviz,需要先安装python graphviz,再安装软件graphvizWindowswindows下安装比较容易出问题,在我的电脑上使用pip安装不成功,使用conda安装比较简单1.安装graphviz软件https://graphviz.gitlab.io/_pages/Download/Download_windows.ht...

2019-03-28 00:09:27

Leetcode 30. Substring with Concatenation of All Words

You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concatenation of each word inwordsexactly once and wi...

2019-03-26 10:08:48

Leetcode 29. Divide Two Integers

Given two integersdividendanddivisor, divide two integers without using multiplication, division and mod operator.Return the quotient after dividingdividendbydivisor.The integer division sho...

2019-03-26 06:57:47

Leetcode 28. Implement strStr()

ImplementstrStr().Return the index of the first occurrence of needle in haystack, or-1if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"Output: 2Example...

2019-03-25 13:13:40

Leetcode 27. Remove Element

Given an arraynumsand a valueval, remove all instances of that valuein-placeand return the new length.Do not allocate extra space for another array, you must do this bymodifying the input arra...

2019-03-25 12:15:56

Leetcode 26. Remove Duplicates from Sorted Array

Given a sorted arraynums, remove the duplicatesin-placesuch that each element appear onlyonceand return the new length.Do not allocate extra space for another array, you must do this bymodifyi...

2019-03-24 08:15:12

Leetcode 25:Reverse Nodes in k-Group

Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.kis a positive integer and is less than or equal to the length of the linked list. If the number of ...

2019-03-24 07:40:55

机器学习 (一):线性回归

1. 最小二乘法与最大似然在回归问题中,我们最常用的就是最小二乘法,也就是均方误差MSE。                                                                               这个形式乍一看很合逻辑,也没有想过为什么会用这种形式。要衡量回归问题的误差,肯定要有模型和目标的差值,再平方一下,求导方便。但其实这个形式可...

2019-02-15 11:48:49

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!