首页 > 其他
【索引】Chapter 1. Algorithm Design :: Designing Efficient Algorithms :: Examples
链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=460 点击题目进入题解:   Title Total Submissions / Solving % Total Users / Solving % 11462 - Age Sort 24713...
分类:其他   时间:2014-02-07 11:48:39    收藏:0  评论:0  赞:0  阅读:388
Leetcode Palindrome Partitioning II
因为我研究了很长时间,没看提示的情况下,观察了各种可能的判断,始终没有找到可行的快捷方法,判断时间效率必定为O(n*n),没有找到什么规律可以提高效率。最后上网搜索也没看到有可行方法。 整个题目解决,如果是可以O(n*n*n)时间复杂度是稍微简单点的,不然对动态规划法的运用就要求比较高了。 下面程序分两个函数,两步解决问题: 函数1 先产生一个回文表,记录了所有子串是回文的表。 函数2 判断最小分隔步数...
分类:其他   时间:2014-02-07 11:16:09    收藏:0  评论:0  赞:0  阅读:359
面向对象设计 经验谈
/*面向对象设计把握一个重要的经验:谁拥有数据,谁就对外提供操作这些数据的方法 1.人在黑板上画圆 2.列车司机紧急刹车 3.售货员统计收获小票的金额 4.你把门关上了 5。球从一根绳子的一段移动到了另一端*/ 1.对于这个设计,上面有person , blackborad , circle三个对象...
分类:其他   时间:2014-02-07 10:40:19    收藏:0  评论:0  赞:0  阅读:310
[Leetcode]-- N-Queens II
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.
分类:其他   时间:2014-02-07 10:39:29    收藏:0  评论:0  赞:0  阅读:352
Codeforce Round #227 Div2
这回的看错时间了!发现理论可以涨分的- -
分类:其他   时间:2014-02-07 10:36:09    收藏:0  评论:0  赞:0  阅读:180
Jump Game II
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:其他   时间:2014-02-07 10:34:29    收藏:0  评论:0  赞:0  阅读:312
[Leetcode]-- Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinki...
分类:其他   时间:2014-02-07 10:31:59    收藏:0  评论:0  赞:0  阅读:411
[Leetcode]-- Minimum Path Sum
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo...
分类:其他   时间:2014-02-07 10:31:09    收藏:0  评论:0  赞:0  阅读:368
Unique Paths II
There is one obstacle in the middle of a 3x3 grid as illustrated below.[ [0,0,0], [0,1,0], [0,0,0]] 1 public class Solution { 2 public int uniquePaths...
分类:其他   时间:2014-02-07 10:30:19    收藏:0  评论:0  赞:0  阅读:331
Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space. 1 public class Solution { 2 public boolean isPalindrome(int x) { 3 if(x=10)...
分类:其他   时间:2014-02-07 10:28:39    收藏:0  评论:0  赞:0  阅读:492
深入探讨 Java 类加载器(转载)
类加载器(class loader)是 Java?中的一个很重要的概念。类加载器负责加载 Java 类的字节代码到 Java 虚拟机中。本文首先详细介绍了 Java 类加载器的基本概念,包括代理模式、加载类的具体过程和线程上下文类加载器等,接着介绍如何开发自己的类加载器,最后介绍了类加载器在 Web...
分类:其他   时间:2014-02-07 10:27:49    收藏:0  评论:0  赞:0  阅读:449
Memcached应用总结
Memcached应用总结 memcached是一款高性能的分布式缓存系统,凭借其简单方便的操作,稳定可靠的性能广泛应用于互联网应用中,网上关于memcached介绍的资料也很多,最经典的资料就是《memcached全面剖析》这个文档,原文链接:http://gihyo.jp/dev/feature...
分类:其他   时间:2014-02-07 10:26:59    收藏:0  评论:0  赞:0  阅读:452
ubuntu 12.04 设置主题颜色的方法
http://www.2cto.com/os/201307/226898.html
分类:其他   时间:2014-02-07 10:26:09    收藏:0  评论:0  赞:0  阅读:405
Memcached 深度分析
Memcached是danga.com(运营LiveJournal的技术团队)开发的一套分布式内存对象缓存系统,用于在动态系统中减少数据库 负载,提升性能。关于这个东西,相信很多人都用过,本文意在通过对memcached的实现及代码分析,获得对这个出色的开源软件更深入的了解,并可以根 据我们的需要对...
分类:其他   时间:2014-02-07 10:25:19    收藏:0  评论:0  赞:0  阅读:449
[Leetcode]-- Unique Paths II
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:其他   时间:2014-02-07 10:23:39    收藏:0  评论:0  赞:0  阅读:557
Memcached 搭建过程
原文链接:http://www.open-open.com/lib/view/open1324368235733.html安装 memcached 服务端 yum -y install libevent libevent-devel #需要 libevent 支持cd /opt rm -rf mem...
分类:其他   时间:2014-02-07 10:22:49    收藏:0  评论:0  赞:0  阅读:381
剑指Offer - 九度1524 - 复杂链表的复制
剑指Offer - 九度1524 - 复杂链表的复制2014-02-07 01:30题目描述:输入一个复杂链表(每个节点中有节点值,以及两个指针,一个指向下一个节点,另一个特殊指针指向任意一个节点)。输入:输入可能包含多个测试样例,输入以EOF结束。对于每个测试案例,输入的第一行为一个整数n (1 ...
分类:其他   时间:2014-02-07 10:21:09    收藏:0  评论:0  赞:0  阅读:405
[Leetcode]-- Jump Game II
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:其他   时间:2014-02-07 10:20:19    收藏:0  评论:0  赞:0  阅读:372
获得创建临时表的session id
通过sql server的default trace和tempdb中的sys.objects视图,你能够获得创建临时表的session id,下面是相应的sql语句:DECLARE @FileName VARCHAR(MAX)SELECT @FileName = SUBSTRING(path, 0,...
分类:其他   时间:2014-02-07 10:19:29    收藏:0  评论:0  赞:0  阅读:362
《剑指Offer》面试题-从头到尾打印链表
题目描述:输入一个链表,从尾到头打印链表每个节点的值。输入:每个输入文件仅包含一组测试样例。每一组测试案例包含多行,每行一个大于0的整数,代表一个链表的节点。第一行是链表第一个节点的值,依次类推。当输入到-1时代表链表输入完毕。-1本身不属于链表。输出:对应每个测试案例,以从尾到头的顺序输出链表每个...
分类:其他   时间:2014-02-07 10:17:49    收藏:0  评论:0  赞:0  阅读:355
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!