摘要: 在很久很久以前,刚有浏览器和网页的时候,web开发者发现了一个问题,我必须要在客户端这边保存一些东西才能实现某些功能,比如大家喜闻乐见的购物车、用户登录、自动登陆等。但是客户端只有一个浏览器,怎么在用户也就是客户端那边保存数据呢?于是大佬们一拍桌子,Cookie就诞生了!我把Cookie理解为一个键... 阅读全文
posted @ 2015-01-14 20:10 Jarvis_Wu 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 共同点:PreparedStatement和Statement都是用来执行SQL查询语句的API之一。不同点:在PreparedStatement中,当我们经常需要反复执行一条结构相似的sql语句,比如:insert into table values(0,'first',1);insert in... 阅读全文
posted @ 2015-01-06 16:12 Jarvis_Wu 阅读(3583) 评论(0) 推荐(0) 编辑
摘要: 1.环境变量的配置在配置tomcat的环境变量时始终配置不对,于是首先检查之前java的环境变量是否正确,发现java命令可以用但是javac却找不到,自己又瞎搞一通,终于javac可以用了,但java命令告诉我:Error:registry key 'software\Java Runtime E... 阅读全文
posted @ 2015-01-04 14:21 Jarvis_Wu 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 题目:Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL... 阅读全文
posted @ 2014-12-28 15:50 Jarvis_Wu 阅读(214) 评论(1) 推荐(0) 编辑
摘要: 最近刚开始接触动态规划(Dynamic Programming)算法,之前略有耳闻,一直觉得DP非常之高大上,看了某些题的DP解法也是云里雾里,哇擦?!这么几行代码就解决了?怎么全是数组操作?时间复杂度也很低的样子。其实不然,当我真正开始学习动态规划的时候才发现这货没那么玄乎。把我对DP浅显的理解总... 阅读全文
posted @ 2014-12-24 17:06 Jarvis_Wu 阅读(448) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which ... 阅读全文
posted @ 2014-12-24 16:35 Jarvis_Wu 阅读(442) 评论(0) 推荐(1) 编辑
摘要: 题目:Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. ... 阅读全文
posted @ 2014-12-14 17:29 Jarvis_Wu 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains onl... 阅读全文
posted @ 2014-12-05 15:02 Jarvis_Wu 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in... 阅读全文
posted @ 2014-12-03 21:21 Jarvis_Wu 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.思路:我的第一个想法是将lists中的链表两两合并排序,这样时间复杂度是o(n),n为所有链表中的数据... 阅读全文
posted @ 2014-11-16 17:45 Jarvis_Wu 阅读(240) 评论(0) 推荐(0) 编辑