ICode9

精准搜索请尝试: 精确搜索
  • LeetCode69 x的平方根 (二分)2022-06-29 11:02:37

    LeetCode69 x的平方根 class Solution(object): def mySqrt(self, x): """ :type x: int :rtype: int """ l, r, ans = 0, x, -1 while l <= r: mid = (l + r) // 2

  • go 反射的快速入门2022-03-26 21:32:50

    此处的变量reflect.TypeOf, reflect.ValueOf, 返回的 其实表示的不是真正的int,它是 reflect.TypeOf(b) 返回的type Type interface, 接口,里面包含了很多方法 不能 var a int = 10, var a1 rType=20 package main import ( "fmt" "reflect" ) //专门演示反射 func reflectTe

  • VUE中如何使用MOCK2021-09-06 14:35:53

    安装mockjs npm install mockjs 可以使用数据模板生成模拟数据。 Mock.mock( rurl?, rtype?, template ) ) // 或者 Mock.mock( rurl, rtype, function( options ) ) Mock.mock( rurl, rtype, template )表示当拦截到rurl和rtype的ajax请求时,将根据数据模板template生成模拟数

  • 深入浅出go专题 不安全指针和反射2021-02-15 03:01:38

    深入浅出go专题 不安全指针和反射 概述 这篇文章也是长篇,为了把问题记录清楚,还是按照一直坚持的写作习惯,从零开始   在C语言中,对指针进行操作是非常正常的一件事,由于指针包裹的是内存地址,因此对于指针来说,也只有加减法具有意义。   下面先看个C的代码: int main(int argc, char*

  • 605. 种花问题2020-04-29 09:00:50

                代码一: 1 class Solution(object): 2 def canPlaceFlowers(self, flowerbed, n): 3 """ 4 :type flowerbed: List[int] 5 :type n: int 6 :rtype: bool 7 """ 8 if le

  • leetcode——155. 最小栈2019-11-02 15:04:02

    class MinStack(object): def __init__(self): """ initialize your data structure here. """ self._elem=[] def push(self, x): """ :type x: int :rtype:

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有