题目描述: 方法一:排序O(Nlogn) class Solution: def removeCoveredIntervals(self, intervals: List[List[int]]) -> int: intervals.sort(key = lambda x:(x[0],-x[1])) res,rmax = len(intervals),intervals[0][1] for i in range(1,len(intervals)): if i > 0 and intervals[…
基础的 api 还是不够熟悉啊 5112. 十六进制魔术数字 class Solution { public: char *lltoa(long long num, char *str, int radix) { const char index[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; unsigned long long unum; int i = 0, j, k; if(radix == 10 && num <…
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: Elements in a triplet (a,b,c) must be in non-descending order. (ie, a ≤ b ≤ c) The solut…