【064-Minimum Path Sum(最小路径和)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers...
分类:
编程语言 时间:
2015-08-02 06:23:02
阅读次数:
928
package coin;import java.io.IOException;import java.nio.file.FileSystems;import java.nio.file.Path;import java.nio.file.StandardWatchEventKinds;import...
分类:
其他好文 时间:
2015-08-02 00:52:30
阅读次数:
129
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他好文 时间:
2015-08-01 23:27:33
阅读次数:
114
1.Windows下安装https://www.python.org/downloads/下载相应版本,进行安装注意:将python的安装路径添加到系统环境变量的PATH路径下,这样才能在命令行窗口下输入python进入python环境2.Linux下安装a.下载源码包https://www.pyt...
分类:
编程语言 时间:
2015-08-01 23:16:17
阅读次数:
164
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.
思路:很基础的一个题,DFS即可。代码如下:
/**
* Defin...
分类:
其他好文 时间:
2015-08-01 22:08:25
阅读次数:
140
给出2个四位数的素数a,b,要求a每次变化只可以变a的4个数字的其中一个,并且变化后的数也要是素数,问a至少要变化多少次才可以变为b。注意,a的千位数不能变化为0先打出素数表,再bfs数a即可。 1 #include 2 #include 3 #include 4 5 using namespac....
分类:
其他好文 时间:
2015-08-01 21:54:15
阅读次数:
94
#include #include #define Max 100int vexNum, arcNum;int vexs[Max], arcs[Max][Max];int INF = 0xffff;int final[Max], path[Max], d[Max];int D[Max][Max], ...
分类:
其他好文 时间:
2015-08-01 20:26:29
阅读次数:
112
#!?/usr/bin/env?python3
#?-*-?coding:utf-8?-*-
‘python进行代理的curl数据提交‘
__author__?=?‘ken‘
import?os;
import?sys;
curPath?=?os.path.abspath(os.path.dirname(__file__));
sys.pat...
分类:
编程语言 时间:
2015-08-01 19:16:30
阅读次数:
239
一:获取文件路径
My JSP 'getPath.jsp' starting page
String path=application.getRealPath("/");
%>
真实路径:
二:获取输入的内容
My JSP 'input_content.jsp...
分类:
移动开发 时间:
2015-08-01 19:07:56
阅读次数:
134
1.settings.py最下方STATIC_URL下面补上STATIC_URL = '/home/wjg/code/wblog/static/'STATIC_ROOT = os.path.join(os.path.dirname(__file__),'../static').replace('\\...
分类:
Web程序 时间:
2015-08-01 18:32:43
阅读次数:
159