2017年4月27日

LeetCode : Min Stack

摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) – Push element x onto stack. pop() –... 阅读全文

posted @ 2017-04-27 23:22 gechen 阅读(72) 评论(0) 推荐(0) 编辑

LeetCode : Range Sum Query - Immutable

摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example: Given nums = [-2, 0, 3, -5, 2, ... 阅读全文

posted @ 2017-04-27 22:34 gechen 阅读(71) 评论(0) 推荐(0) 编辑

非阻塞IO与异步IO的区别

摘要: 对于非阻塞IO而言,当内核中数据准备好的时候,数据会从内核空间拷贝到用户内存中,这个时候进程是被block了,在这段时间内,进程是被block的。而异步IO则不一样,当进程发起IO 操作之后,就直接返回再也不理睬了,直到内核通过回调函数发送一个信号,通知进程IO完成。在这整个过程中... 阅读全文

posted @ 2017-04-27 09:23 gechen 阅读(163) 评论(0) 推荐(0) 编辑

导航