上一页 1 2 3 4 5 6 7 8 9 10 ··· 23 下一页
摘要: Problem:Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You m... 阅读全文
posted @ 2016-01-14 21:59 尾巴草 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Problem:Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For examp... 阅读全文
posted @ 2016-01-14 20:37 尾巴草 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 按照上一节中《搭建高可用mongodb集群(三)—— 深入副本集》搭建后还有两个问题没有解决:从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大?数据压力大到机器支撑不了的时候能否做到自动扩展?在系统早期,数据量还小的时候不会引起太大的问题,但是随着数据量持续增多,后续迟早会出现一台机器... 阅读全文
posted @ 2016-01-12 14:40 尾巴草 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 在上一篇文章《搭建高可用mongodb集群(二)—— 副本集》 介绍了副本集的配置,这篇文章深入研究一下副本集的内部机制。还是带着副本集的问题来看吧!副本集故障转移,主节点是如何选举的?能否手动干涉下架某一台主节点。官方说副本集数量最好是奇数,为什么?mongodb副本集是如何同步的?如果同步不及时... 阅读全文
posted @ 2016-01-12 14:39 尾巴草 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 在上一篇文章《搭建高可用MongoDB集群(一)——配置MongoDB》 提到了几个问题还没有解决。主节点挂了能否自动切换连接?目前需要手工切换。主节点的读写压力过大如何解决?从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大?数据压力大到机器支撑不了的时候能否做到自动扩展?这篇文章看完... 阅读全文
posted @ 2016-01-12 14:38 尾巴草 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 在大数据的时代,传统的关系型数据库要能更高的服务必须要解决高并发读写、海量数据高效存储、高可扩展性和高可用性这些难题。不过就是因为这些问题Nosql诞生了。NOSQL有这些优势:大数据量,可以通过廉价服务器存储大量的数据,轻松摆脱传统mysql单表存储量级限制。高扩展性,Nosql去掉了关系数据库的... 阅读全文
posted @ 2016-01-12 14:36 尾巴草 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 一、前言 最近开始学习非关系型数据库MongoDB,却在博客园上找不到比较系统的教程,很多资料都要去查阅英文网站,效率比较低下。本人不才,借着自 学的机会把心得体会都记录下来,方便感兴趣的童鞋分享讨论。部分资源出自其他博客,旨将零散知识点集中到一起,如果有侵犯您的权利,请联系li- pan2@16... 阅读全文
posted @ 2016-01-11 10:30 尾巴草 阅读(156) 评论(0) 推荐(0) 编辑
摘要: given an integer,write a function to determine if it is a power of three.class Solution {public: bool isPowerOfThree(int n) { if(n<1) return... 阅读全文
posted @ 2016-01-08 18:41 尾巴草 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Problem:There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggl... 阅读全文
posted @ 2016-01-08 16:46 尾巴草 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Solution:You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 ... 阅读全文
posted @ 2016-01-04 21:43 尾巴草 阅读(109) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 23 下一页