01 2020 档案
摘要:Question Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents y
阅读全文
摘要:主要函数 bisect.bisect_left(data, 4, lo=0, hi=len(a)) # 在data找到第一个大于等于4的数的index(即插入4后左边数小于4,右边数大于等于4) bisect.bisect_right(data, 4) # 在data找到第一个大于4的数的index
阅读全文
摘要:Question Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses. Now, you ar
阅读全文
摘要:Question Given an array of citations sorted in ascending order (each citation is a non-negative integer) of a researcher, write a function to compute
阅读全文
摘要:Question Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.
阅读全文
摘要:Question There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank an
阅读全文