摘要: Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文
posted @ 2014-09-03 21:11 dijkstra-c 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2014-09-02 19:30 dijkstra-c 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest le... 阅读全文
posted @ 2014-09-02 19:27 dijkstra-c 阅读(104) 评论(0) 推荐(0) 编辑
摘要: A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ... 阅读全文
posted @ 2014-09-02 16:45 dijkstra-c 阅读(295) 评论(0) 推荐(0) 编辑
摘要: You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-placen*n矩阵顺时针旋转90度,规律 a[i... 阅读全文
posted @ 2014-09-02 15:30 dijkstra-c 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.开启windows telnet服务2. ifconfig 拿到linux ip,servcie sshd 看看ssh服务安装了没3.开启 阅读全文
posted @ 2014-08-10 10:51 dijkstra-c 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 算法思想灰常重要,常见的用到分治思想的算法包括快速排序,归并,二分搜搜,大整数乘法等(参考 http://blog.csdn.net/com_stu_zhang/article/details/7233761,归纳很到位)简单用归并对一个数组排序 思路: 简单来说对一个数组,只要他的左右两部分都是有... 阅读全文
posted @ 2014-07-31 21:59 dijkstra-c 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 1.参数文件2.日志文件 错误日志文件 xxx.err文件(xxx一般代表主机名) 慢查询日志文件 1).一般是设置一个阈值,将执行时间超过该值的sql语句记录到慢查询日志里面 需要设置long_query_time参数(5.1版本后单位微秒),开关为log_slo... 阅读全文
posted @ 2014-07-30 21:39 dijkstra-c 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 1. 创建maven项目 需要手工创建src/main/java src/main/resources src/test/.. 4个code package2. 把项目转成dynamic web project(Project Facets) 需要配置context root和content... 阅读全文
posted @ 2014-07-17 22:52 dijkstra-c 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 翻转字符串,想到什么写什么。。。我的做法是先trim掉空格,然后从字符串尾部开始扫描,遇到空格则认为一个单词结束,然后copy这个单词。需要注意的地方在于当扫描到最后一个单词的第一个字母时(譬如the sky is blue的t字母),注意单词长度的自增逻辑。网上还有人的做法是反转整个字符串,然后逐... 阅读全文
posted @ 2014-07-16 14:05 dijkstra-c 阅读(246) 评论(0) 推荐(0) 编辑