码迷,mamicode.com
首页 >  
搜索关键字:search for a range    ( 21670个结果
LeetCode1
解法1 class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: dit = {} for i in range(len(nums)): other = target - nums[i] if other ...
分类:其他好文   时间:2021-04-06 14:26:04    阅读次数:0
python学习第三天
一 for循环 #for循环可以循环任何序列的项目 for i in range(1,10): for j in range(1,i+1): print('%s*%s=%s'%(i,j,i*j),end="") print() 二 可变不可变类型 #for循环可以循环任何序列的项目 for i in ...
分类:编程语言   时间:2021-04-05 12:49:56    阅读次数:0
Turtle模块-绘制组合图形
效果展示: 代码展示: import turtle # 设置画笔以及背景颜色 turtle.color('red') # 设置背景色 turtle.bgcolor('black') # 设置画笔粗细 turtle.pensize(6) # 设置初始值 n = 1 for j in range(2): ...
分类:其他好文   时间:2021-04-05 12:04:08    阅读次数:0
LeetCode: 二叉树的遍历
二叉树的遍历 前序遍历 LeetCode.144. 二叉树的前序遍历 二叉树的前序/中序/后序遍历的非递归描述一般适合用深度优先搜索 (DFS, depth-first search), 并使用栈的数据结构. 版本1 递归 from typing import List class Node: de ...
分类:其他好文   时间:2021-04-05 11:47:20    阅读次数:0
数据结构和算法-算法引入
1.算法引入 # 算法引入 # 题目 a + b + c = 1000, a^2 + b^2 = c^2, 求a, b, c # 方案1 for a in range(1001): for b in range(1001): c = 1000 - a - b if a**2 + b**2 == c* ...
分类:编程语言   时间:2021-04-05 11:42:19    阅读次数:0
【数据分析-numpy-pandas】
数据分析-Numpy 1.numpy-安装和使用 1.1 简介 1.2 安装 pip install numpy 1.3 使用 import numpy as np 2.numpy-ndarray的数据类型 简单示例 下划线是为了和python关键字区分 a = np.array(range(10) ...
分类:其他好文   时间:2021-04-05 11:42:01    阅读次数:0
303. Range Sum Query - Immutable
问题: 给定一个数组,求任意区间[left, right]的元素和。 Example 1: Input ["NumArray", "sumRange", "sumRange", "sumRange"] [[[-2, 0, 3, -5, 2, -1]], [0, 2], [2, 5], [0, 5]] ...
分类:其他好文   时间:2021-04-01 12:58:58    阅读次数:0
二分查找
#include <iostream> void print_arrs(const int *, int N); void sort_arrs(int *pInt, int N); constexpr int COUNT = 10; int search_data(const int *pInt, ...
分类:其他好文   时间:2021-03-31 12:20:32    阅读次数:0
关于kratos的底层赋值参考
package main import ( "fmt" "time" ) func main() { s := NewServices( SetName("peter"), SetTimeout(time.Second*5), ) fmt.Println("name:", s.conf.Name) ...
分类:其他好文   时间:2021-03-31 12:16:53    阅读次数:0
dockerSearch命令报错解决方案
dockerSearch命令 Get https://index.docker.io/v1/search?q=redis&n=25: dial tcp: lookup index.docker.io on [::1]:53: read udp [::1]:49555->[::1]:53: read:... ...
分类:其他好文   时间:2021-03-31 12:10:21    阅读次数:0
21670条   上一页 1 ... 18 19 20 21 22 ... 2167 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!