鱼儿慢慢游~~

导航

 
上一页 1 ··· 3 4 5 6 7 8 9 下一页

2016年5月25日

摘要: 描述: 其实我没有看到这个题 给定一个数n, 求其全排列。 如3 则输出 [1, 2, 3][1, 3, 2][2, 1, 3][2, 3, 1][3, 1, 2][3, 2, 1] 使用回溯法求解。 使用n维数组visit 来标记一个数是否已经加入集合。回溯树如下: 深度优先搜索,当搜索深度为n时 阅读全文
posted @ 2016-05-25 16:05 miss_UU 阅读(398) 评论(0) 推荐(0) 编辑
 
摘要: 题目描述: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not 阅读全文
posted @ 2016-05-25 10:22 miss_UU 阅读(154) 评论(0) 推荐(0) 编辑
 
摘要: 题目描述: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 uniq 阅读全文
posted @ 2016-05-25 09:12 miss_UU 阅读(161) 评论(0) 推荐(0) 编辑
 

2016年5月13日

摘要: 在c++中,一下几种情况会产生临时对象: 1. 按值进行函数参数传递时 2. 函数返回对象时 3. 发生类型转化时。 c++中产生的临时对象是不可修改的,及默认为const的 非常量引用产生临时对象: 这里upper 函数的操作是将str转换为大写,而在进行了上面代码的调用时,发生了类型转化,产生临 阅读全文
posted @ 2016-05-13 17:10 miss_UU 阅读(376) 评论(0) 推荐(0) 编辑
 
摘要: 1 #!/bin/sh 2 # 3 # chkconfig: - 39 35 4 # description: start and stops redis server 5 # programname: redis 6 7 # Source function library. 8 if [ -f /etc/init.d/functions ] ; then ... 阅读全文
posted @ 2016-05-13 15:46 miss_UU 阅读(303) 评论(0) 推荐(0) 编辑
 

2016年5月11日

摘要: 题目描述: 难度: 中等 Sort a linked list using insertion sort. 中文描述: 使用插入排序对一个链表进行排序. 解析: 插入排序就不多说了,主要看插入排序对于单链表来说怎么做. 在单链表中,由于无法拿到链表的前一个元素,所有每次遍历必须从head 开始.找到 阅读全文
posted @ 2016-05-11 10:30 miss_UU 阅读(171) 评论(0) 推荐(0) 编辑
 

2016年5月10日

摘要: 原问题描述: 难度: 中等 Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements o 阅读全文
posted @ 2016-05-10 16:26 miss_UU 阅读(136) 评论(0) 推荐(0) 编辑
 
摘要: http://blog.codinglabs.org/articles/consistent-hashing.html 在分布式缓存系统中, 如何把数据映射到不同的缓存服务器上,一般会采用hash算法,如共有3台缓存服务器时, h= Hash(key)%3, 这种hash算法的扩展性和容错性不好,当 阅读全文
posted @ 2016-05-10 14:52 miss_UU 阅读(334) 评论(0) 推荐(0) 编辑
 

2016年5月6日

摘要: set nocompatible " be iMproved filetype off " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() " let Vundle manage Vundle " required! Bundle 'gmarik/... 阅读全文
posted @ 2016-05-06 17:41 miss_UU 阅读(390) 评论(0) 推荐(0) 编辑
 

2016年4月19日

摘要: 在读UNIX网络编程卷一 13.4 守护进程编写时, 书中写到,这里必须忽略SIGHUP信号,因为会话头进程(及首次fork产生的子进程,通过setsid 成为会话头进程)终止后,会向其会话中所有进程(及再次fork产生的子进程)发送SIGHUP信号。 在这里有个疑问,SIGHUP信号在第一个父进程 阅读全文
posted @ 2016-04-19 15:19 miss_UU 阅读(2727) 评论(0) 推荐(0) 编辑
 
上一页 1 ··· 3 4 5 6 7 8 9 下一页