摘要: Decrisption Given an array of integers arr, find the sum of min(b), where b ranges over every (contiguous) subarray of arr. Since the answer may be la 阅读全文
posted @ 2022-10-26 22:30 天涯海角寻天涯 阅读(45) 评论(0) 推荐(0)
摘要: Description 给定一个长度为N的int型数组a[0,1,2,...N-1], 请计算逆序对个数.当i<j且a[i]>a[j], 则称a[i]与a[j]是一对逆序对. Input 第一行输入M表示包含M组测试数据,每组先输入N (N<=50000), 接着输入N个int型整数. Output 阅读全文
posted @ 2022-05-02 12:06 天涯海角寻天涯 阅读(235) 评论(0) 推荐(0)
摘要: 1、5268. 找出两数组的不同 - 力扣(LeetCode) (leetcode-cn.com) 给你两个下标从 0 开始的整数数组 nums1 和 nums2 ,请你返回一个长度为 2 的列表 answer ,其中: answer[0] 是 nums1 中所有 不 存在于 nums2 中的 不同 阅读全文
posted @ 2022-03-27 18:10 天涯海角寻天涯 阅读(65) 评论(0) 推荐(0)
摘要: In the book Operating System Concepts- 9th Edition - Chapter 3 - Page 117 - Page 120 it says: How do we understand this concept? There is an answer ge 阅读全文
posted @ 2022-03-24 11:33 天涯海角寻天涯 阅读(52) 评论(0) 推荐(1)
摘要: 871. 最低加油次数 - 力扣(LeetCode) (leetcode-cn.com) 汽车从起点出发驶向目的地,该目的地位于出发位置东面 target 英里处。 沿途有加油站,每个 station[i] 代表一个加油站,它位于出发位置东面 station[i][0] 英里处,并且有 statio 阅读全文
posted @ 2022-03-23 19:11 天涯海角寻天涯 阅读(815) 评论(0) 推荐(2)
摘要: 338. 比特位计数 - 力扣(LeetCode) (leetcode-cn.com) 记录这道题主要不是因为它本身难度有多大,而是它的解法中间有一些技巧以后可能用得到,故在此记录 1、判断一个数是否为2的整数次幂 由于2的整数次幂只有最高位是1,其他位全为0。所以2n-1就全为1,且最高位为0。因 阅读全文
posted @ 2022-03-21 20:26 天涯海角寻天涯 阅读(79) 评论(0) 推荐(1)
摘要: 1、6027. 统计数组中峰和谷的数量 - 力扣(LeetCode) (leetcode-cn.com) 给你一个下标从 0 开始的整数数组 nums 。如果两侧距 i 最近的不相等邻居的值均小于 nums[i] ,则下标 i 是 nums 中某个峰的一部分。类似地,如果两侧距 i 最近的不相等邻居 阅读全文
posted @ 2022-03-20 20:39 天涯海角寻天涯 阅读(134) 评论(0) 推荐(1)
摘要: 继续与动态规划斗智斗勇。。。 132. 分割回文串 II - 力扣(LeetCode) (leetcode-cn.com) 分析:记f[i]表示将字符串s[0:i]分割的最小次数。我们需要将列举出在[0:i]内的最大回文串数。我们可以列举出最后一个回文串s[j+1:i],那么f[i]就可以写出: f 阅读全文
posted @ 2022-03-12 16:27 天涯海角寻天涯 阅读(46) 评论(0) 推荐(0)
摘要: 今天做了力扣中的一道经典题:三数之和。这题思路倒是很快想到,调逻辑可把我调得够呛,这也正说明我的刷题思维远远不够,比起我室友半个月刷300多题的思维差远了。。。革命尚未成功,同志仍需努力。 原题链接:15. 三数之和 - 力扣(LeetCode) (leetcode-cn.com) 题解:题目要我们 阅读全文
posted @ 2022-03-07 17:12 天涯海角寻天涯 阅读(51) 评论(0) 推荐(1)
摘要: This article is reproduced from:Asymmetric Multiprocessing (tutorialspoint.com) Asymmetric multiprocessor systems are a part of multiprocessor systems 阅读全文
posted @ 2022-03-06 20:50 天涯海角寻天涯 阅读(51) 评论(0) 推荐(0)