题目描述 给出一个有序数组,请在数组中找出目标值的起始位置和结束位置 你的算法的时间复杂度应该在O(log n)之内 如果数组中不存在目标,返回[-1, -1]. 例如: 给出的数组是[5, 7, 7, 8, 8, 10],目标值是8, 返回[3, 4]. Given a sorted array ...
分类:
其他好文 时间:
2020-08-01 12:42:08
阅读次数:
86
Zhang3 a participant of IPhO (Immortal Physics Olympiad). The $0^\mathrm$ problem in the contest is as follows. There are two balls that weigh \(a\) k ...
分类:
其他好文 时间:
2020-07-30 22:15:00
阅读次数:
110
简介 Redis 是一款开源非关系型(NoSQL)数据库,遵守BSD协议,Key-Value数据结构,Redis支持持久化,数据持久化时数据存储在磁盘中,有着高性能的读写效率。 特点: 1、Redis支五种数据类型:Strings(字符串)、Lists(列表)、Hashes(哈希)、Sets(集合) ...
分类:
其他好文 时间:
2020-07-30 01:13:05
阅读次数:
56
Multiprocessing.Pool可以提供指定数量的进程供用户调用,当有新的请求提交到pool中时,如果池还没有满,那么就会创建一个新的进程用来执行该请求;但如果池中的进程数已经达到规定最大值,那么该请求就会等待,直到池中有进程结束,才会创建新的进程来执行它。Pool类用于需要执行的目标很多, ...
分类:
系统相关 时间:
2020-07-29 17:53:42
阅读次数:
93
一、pd.merge() 二、join() 三、combine_first() ...
分类:
其他好文 时间:
2020-07-29 17:47:28
阅读次数:
68
Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to h ...
分类:
其他好文 时间:
2020-07-29 15:41:09
阅读次数:
86
power_two.cpp内容如下: #include <iostream> using namespace std; bool is_power_of_two(unsigned int n) { return (n && !(n & (n-1))); } int main(int argc, ch ...
分类:
其他好文 时间:
2020-07-29 15:07:26
阅读次数:
62
一、将本地文件修改后push到远程分支有时会出现 devlops|MERGE git add . git commit -m "feat:优惠券功能" git pull ........... (devlops|MEARGE) git add . git commit -m "feat:优惠券" g ...
分类:
其他好文 时间:
2020-07-29 12:45:53
阅读次数:
103
代码合并一般分两种情况rebase与merge 说明:如果div是从master创建出来的分支,那么,master就是dev的上游,dev是在master的下游。 下游合并上游:要尽可能的保存提交路径简洁,那么用rebase 上游合并下游:要尽可能的保存提交细节,那么采用merge dev分支下:m ...
分类:
其他好文 时间:
2020-07-29 12:37:40
阅读次数:
94
Given two strings s1, s2, find the lowest ASCII sum of deleted characters to make two strings equal. Example 1: Input: s1 = "sea", s2 = "eat" Output: ...
分类:
其他好文 时间:
2020-07-28 14:45:21
阅读次数:
310