摘要:
题目Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the va... 阅读全文
摘要:
为什么要批量插入要插入10000条数据,如果不批量插入的话,那么我们执行的sql语句将是10000条insertinsert into member (group_id, user_id, role, extend) values (101, 100, 3, NULL)insert into mem... 阅读全文
摘要:
之前使用eclipse + maven + jetty开发java web应用,本着no zuo no gain的想法,折腾了一下Intellj idea下开发环境的搭建,顺带学习了maven repository的概念。环境系统:OS X YosemiteIDE:IntelliJ IDEA 14.... 阅读全文
摘要:
代码实现 1 #ifndef _SORT_H 2 #define _SORT_H 3 4 // goal: quicksort and insertsort 5 // time: 12/2/2014 6 // author: zrss 7 // reference: introduction to... 阅读全文
摘要:
原题链接:https://oj.leetcode.com/problems/sort-list/题目:空间复杂度为常数,时间复杂度为O(nlogn)的排序链表实现方法一:第一想法是模拟数组的快速排序,参考了算法导论,于是思路被牵到了如何处理交换节点上,几经波折总算实现,不过提交的结果TLE。 1 ... 阅读全文
摘要:
第一次接触java web开发,花费了一天半的时间,写了个简单的登录页面,以此文为记。开发工具Eclipse Luna Release (4.4.0) 已集成maven,maven目前的体会就是管理各种依赖jetty为maven提供的一个插件,类似tomcatstruts2框架,MVC,action... 阅读全文
摘要:
1 //goal: heap sort 2 //time: 9/7/2014 3 //author: zrss 4 //reference: introduction to algorithms 5 6 #include 7 #include 8 9 #define MAX_DATA 10... 阅读全文
摘要:
Loading Cargo"Look Stephen, here's a list of the items that need to be loaded onto the ship. We're going to need a lot of batteries." Nikola handed hi... 阅读全文
摘要:
Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may ... 阅读全文
摘要:
Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Clari... 阅读全文