码迷,mamicode.com
首页 >  
搜索关键字:np    ( 2362个结果
[LeetCode]78 Subsets
https://oj.leetcode.com/problems/subsets/http://blog.csdn.net/linhuanmars/article/details/24286377publicclassSolution{ publicList<List<Integer>>subsets(int[]S){ Arrays.sort(S); List<List<Integer>>results=newArrayList<>(); hel..
分类:其他好文   时间:2015-01-04 19:35:38    阅读次数:146
[LeetCode]83 Remove Duplicates from Sorted List
https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list/http://blog.csdn.net/linhuanmars/article/details/24354291/** *Definitionforsingly-linkedlist. *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ pub..
分类:其他好文   时间:2015-01-04 19:31:37    阅读次数:201
python 的 matplotlib画图 画曲线图
#encoding:utf-8 #1.绘制曲线: import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 10, 1000) y = np.sin(x) plt.figure(figsize=(8,4)) plt.plot(x,y,label="$sin(x)$",color="red",linewidth=2)...
分类:编程语言   时间:2015-01-04 17:13:34    阅读次数:616
matplotlib 画图 条形图
#绘制条形图 import numpy as np import matplotlib.pyplot as plt y=[] plt.figure(1) width=1 for i in range(len(y)): plt.figure(1) plt.bar(i*width,y[i],width) plt.xlabel("X") plt.ylabel("Y") plt.show(...
分类:其他好文   时间:2015-01-04 17:13:16    阅读次数:169
matplotlib 画图 散列图
4.绘制散列图 import matplotlib.pyplot as plt import numpy as np import random plt.figure(figsize=(8,4)) x=np.random.random(100) y=np.random.random(100) plt.scatter(x,y,s=x*1000,c=y,marker=(5,1),alpha=0.8,l...
分类:其他好文   时间:2015-01-04 17:11:18    阅读次数:253
matplotlib 画图 三维图
#绘制三维图 import numpy as np import mpl_toolkits.mplot3d import matplotlib.pyplot as plt x,y=np.mgrid[-2:2:20j,-2:2:20j] z=x*np.exp(-x**2-y**2) ax=plt.subplot(111,projection='3d') ax.plot_surface(x,y,z,r...
分类:其他好文   时间:2015-01-04 17:10:27    阅读次数:258
[LeetCode]37 Sudoku Solver
https://oj.leetcode.com/problems/sudoku-solver/http://blog.csdn.net/linhuanmars/article/details/20748761publicclassSolution{ publicvoidsolveSudoku(char[][]board){ resolve(board,0,0); } privatebooleanresolve(char[][]b,//currentboard inti,//currentrow intj)/..
分类:其他好文   时间:2015-01-03 13:24:47    阅读次数:155
[LeetCode]47 Permutations II
https://oj.leetcode.com/problems/permutations-ii/http://blog.csdn.net/linhuanmars/article/details/21570835publicclassSolution{ publicList<List<Integer>>permuteUnique(int[]num) { //SolutionA: //returnpermuteUnique_Swap(num); //SolutionB: returnp..
分类:其他好文   时间:2015-01-03 13:21:53    阅读次数:143
[LeetCode]51 N-Queens
https://oj.leetcode.com/problems/n-queens/http://blog.csdn.net/linhuanmars/article/details/20667175publicclassSolution{ publicList<String[]>solveNQueens(intn){ List<String[]>result=newArrayList<>(); int[]qcols=newint[n]; solve(n,0,qcols,r..
分类:其他好文   时间:2015-01-03 08:14:06    阅读次数:214
[LeetCode]52 N-Queens II
https://oj.leetcode.com/problems/n-queens-ii/http://blog.csdn.net/linhuanmars/article/details/20668017SameasN-Queens.publicclassSolution{ publicinttotalNQueens(intn){ Resultresult=newResult(); int[]qcols=newint[n]; resolve(n,0,qcols,result); returnresult.va..
分类:其他好文   时间:2015-01-03 08:13:17    阅读次数:149
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!