随笔分类 - ruby
摘要:闲来无事,不如试着用ruby刷刷题 1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume
阅读全文
摘要:Array#bsearch bsearch { |x| ... } -> object | nil bsearch -> Enumerator 基于块评估结果来判断范围中的每个元素,并且通过二进制搜索来搜索满足条件的值(计算量为O(log n))。如果找不到该元素,则返回nil。Array 必须事先
阅读全文
摘要:什么是Redis? 作为缓存系统而闻名,NoSQL之一 在NoSQL中,KVS(键值存储)。保存键/值组合。 数据类型的各种用途 字符串,列表,集合,排序集合,哈希 内存中的速度如此之快 持久性可以设置 单线 可能扩展 在哪里使用 当处理带有到期日期的数据(例如会话)时 处理需要运行繁重的SQL(例
阅读全文

浙公网安备 33010602011771号