2020年2月5日

摘要: 操作系统最重要的一点就是具有多道程序设计。通常来说,单个用户并不能使CPU或者I/O设备都繁忙。多道程序设计通过组织作业(编码或数据)的形式,使得CPU总有作业可执行,从而大大提高了CPU的利用率。多道程序设计的思想如下: 操作系统同时将多个任务保存在内存中。该作业集可以是作业池中作业集的子集(因为 阅读全文
posted @ 2020-02-05 00:23 Jain_Shaw 阅读(132) 评论(0) 推荐(0) 编辑

2020年2月3日

摘要: 计算机系统可以采用不同的方式进行组织,大致可按照其采用的通用处理器数量来进行分类。 1. 单处理器系统 目前绝大多数的系统都是采用单处理器系统。在单处理系统中,有一个主CPU可以执行通用指令集,包括来自用户进程的指令。 2. 多处理器系统 尽管多数的现代操作系统都是属于单处理器系统,但多处理器系统( 阅读全文
posted @ 2020-02-03 00:45 Jain_Shaw 阅读(273) 评论(0) 推荐(0) 编辑

2019年12月21日

摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2019-12-21 13:41 Jain_Shaw 阅读(104) 评论(0) 推荐(0) 编辑

2019年12月16日

摘要: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
posted @ 2019-12-16 20:47 Jain_Shaw 阅读(115) 评论(0) 推荐(0) 编辑

2019年12月4日

摘要: Count the number of prime numbers less than a non-negative number, n. Example: Input: 10Output: 4Explanation: There are 4 prime numbers less than 10, 阅读全文
posted @ 2019-12-04 22:46 Jain_Shaw 阅读(228) 评论(0) 推荐(0) 编辑

2019年11月13日

摘要: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2019-11-13 22:57 Jain_Shaw 阅读(186) 评论(0) 推荐(0) 编辑

2019年10月16日

摘要: Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endp 阅读全文
posted @ 2019-10-16 21:16 Jain_Shaw 阅读(133) 评论(0) 推荐(0) 编辑

2019年10月5日

摘要: Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate extra 阅读全文
posted @ 2019-10-05 00:11 Jain_Shaw 阅读(236) 评论(0) 推荐(0) 编辑

2019年9月24日

摘要: Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. Example: Input: 3Output:[ [ 1, 2, 3 ], [ 8, 9, 阅读全文
posted @ 2019-09-24 21:32 Jain_Shaw 阅读(134) 评论(0) 推荐(0) 编辑

2019年9月22日

摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Input:[ [ 1, 2, 3 ], [ 4, 5, 6 ], 阅读全文
posted @ 2019-09-22 14:50 Jain_Shaw 阅读(157) 评论(0) 推荐(0) 编辑

导航