- 博客(12)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 5. Longest Palindromic Substring
/** * Created by zhangwd4 on 2017/12/25. * * 题目意思是:找出一个字符串的最大回文子字符串。意思就是中心对称的子字符串。当 * 然分两种情况 * 1 奇数类型的对称 如 aba * 2 偶数类型的对称 如 abba * */public class LeetCode5 { int start = 0; int end
2017-12-25 17:45:44 138
原创 34. Search for a Range
一开始写错了代码如下class Solution { public int[] searchRange(int[] nums, int target) { int[] result = new int[]{-1,-1}; if(nums == null || nums.length==0){ return result;
2017-11-28 17:50:35 151
原创 74. Search a 2D Matrix
这道题题目要求很简单,说白了就是二维数组的二分查找,代码如下import java.util.Random;/** * Created by zhangwd4 on 2017/11/23. */public class LeetCode74 { public boolean searchMatrix(int[][] matrix, int target) {
2017-11-23 18:31:53 164
原创 leetcode刷题-堆栈3
package com.zwd.wkst.leetcode.stack;import java.util.Stack;/** * Created by zhangwd4 on 2017/11/2. * * Given a string containing just the characters '(', ')', '{', '}', '[' and ']', * determin
2017-11-02 17:03:30 166
原创 leetcode刷题-堆栈2
package com.zwd.wkst.leetcode.stack;import java.util.Stack;/** * Created by zhangwd4 on 2017/11/2. * * Given a string containing just the characters '(' and ')', * find the length of the longe
2017-11-02 15:10:47 189
转载 leetcode题目分类
利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.leetcode.com/problems/longest-valid-parentheses/ (也可以用一维数组,贪心)http://oj.leetcode.com/problems/valid-parentheses/
2017-11-02 13:43:08 372
原创 linux权限的一些简单总结
Linux权限的三个概念:可读,可写,可执行。 Linux文件和目录有以下三种方式:分别是rwx对应可读可写可执行(readwriteexecute) Linux文件和目录又可以有三个所有者的概念:分别是:ugo对应所有者,所属组,其他人。 例如: 以 为例:dr-xr-xr-x:我们可以把它拆开来解读,d r-x r-x r-x d:代表的
2017-10-30 15:33:13 546
转载 struts配置文件详解
标签可以将一个struts.xml文件拆分成多个struts配置文件,然后再struts.xml文件中使用include标签引入拆分出来的配置文件。 提示:当设置该参数为GBK时,相当于调用HttpServletRequest的setCharacterEncoding方法. > constant name="struts.i18n.enc
2017-08-23 15:03:22 319
转载 struct2中freemarker的用法
第一步:这个页面事先建好 form.html ,首先会运行这个页面提交username数据 formaction" method="post">username">第二步,建立好模板文件show.ftl${username}第三步:建立formaction对应的处理类FormAction.java,主要源码如下:public class FormActi
2017-08-23 11:56:13 251
转载 Maven的pom.xml文件详解
pom.xml的结构总览:project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
2017-08-17 15:44:33 170
TA创建的收藏夹 TA关注的收藏夹
TA关注的人