- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 阻塞和非阻塞
之前对阻塞和非阻塞的概念一直比较模糊,当结合进程状态看时,豁然开朗进程执行阻塞IO时,如果没有资源就会被阻塞,放弃CPU,进入阻塞队列,等待唤醒,而非阻塞IO中,进程不会放弃CPU,通过IO操作函数的返回值来判断当前IO是否成功,直到IO返回资源...
2021-05-15 13:33:24
73
原创 剑指offer-151.《翻转字符串里的单词》
题目描述输入一个英文句子,翻转句子中单词的顺序,但单词内字符的顺序不变。为简单起见,标点符号和普通字母一样处理。例如输入字符串 "I am a student. ",则输出 "student. a am I"。示例 1:输入: "the sky is blue"输出:"blue is sky the"示例 2:输入:" hello world! "输出:"world! hello"解释:输入字符串可以在前面或者后面包含多余的空格,但是反转后的字符不能包括。思路如果用Jav...
2021-02-02 19:53:53
77
原创 hihoCoder-Lost in the City
hihoCoder-Lost in the City描述Little Hi gets lost in the city. He does not know where he is. He does not know which direction is north.Fortunately, Little Hi has a map of the city. The map can be ...
2018-09-05 18:11:21
128
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人