码迷,mamicode.com
首页 >  
搜索关键字:called    ( 1945个结果
LeetCode--链表1-单链表
LeetCode 链表1 单链表 单链表模板 1. 初始化 1. 头部插入 1. 尾部插入 1. 删除节点 1. Index插入 1. Index返回对应的节点指针和val值 ...
分类:其他好文   时间:2020-02-08 20:51:52    阅读次数:91
单元测试
文章目录 什么时候用到单元测试:1、写完代码以后:想要验证一下自己写的代码是否有问题。2、写代码之前:就是写代码之前所有的功能分模块的设计好,测试通过了再写。(我反正是没用过)。3、修复某个bug后:一般修复完某个bug,为了确保修复是成功的,会写测试。以test开头的方法,在方法内部进行测试- (... ...
分类:其他好文   时间:2020-02-08 11:58:04    阅读次数:66
vue组件通信(props,$emit,$attrs,$listeners)
朝颜陌 vue基础 组件通信(props,$emit,$attrs,$listeners) 一、父传子,子传孙 1. props 1>在父组件中通过子组件自定义的标签属性来传递数据。 2>在子组件中通过props声明希望用到的数据 1 <body> 2 <div id="app"> 3 <my-fa ...
分类:其他好文   时间:2020-02-07 17:08:03    阅读次数:65
[leetcode]Design Tic-Tac-Toe
正确做法是: 只保存行/列/对角线的和,而不用保存所有元素,空间复杂度从O(n2)降到O(n);move()只需判断四个值是否 = n - 1: 当前行sum,当前列sum,两个对角线,时间复杂度为O(1) 而我只是用dict记录是否还有可能赢。差强人意。 class TicTacToe: def ...
分类:其他好文   时间:2020-02-06 23:01:45    阅读次数:59
Android中创建一个BroadcastReceiver
首先创建一个java类继承BroadcastReceiver类 package com.example.service; import android.content.BroadcastReceiver; import android.content.Context; import android. ...
分类:移动开发   时间:2020-02-05 20:20:07    阅读次数:116
动态规划——01背包
Bone Collecter Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such a ...
分类:其他好文   时间:2020-02-04 00:21:29    阅读次数:92
[leetcode]Moving Average from Data Stream
使用了queue from queue import Queue class MovingAverage: def __init__(self, size: int): """ Initialize your data structure here. """ self.que = Queue() s ...
分类:其他好文   时间:2020-02-01 19:17:53    阅读次数:74
131工结
class MinStack { //变量的初始化可以在private里写 private: stack<int> s; stack<int> min; public: /** initialize your data structure here. */ //初始化就是把其全部置空 MinStac ...
分类:其他好文   时间:2020-01-31 12:44:21    阅读次数:79
codeforces - 913B Christmas Spruce(树)
题目链接:https://vjudge.net/problem/CodeForces-913B 题目描述: Consider a rooted tree. A rooted tree has one special vertex called the root. All edges are dire ...
分类:其他好文   时间:2020-01-30 11:17:51    阅读次数:101
STL-string用法
1 #include <string> 2 #include <iostream> 3 #include <cstring> 4 #include <algorithm> 5 6 using namespace std; 7 8 int to_lower(int c) 9 { 10 if (isup ...
分类:其他好文   时间:2020-01-28 12:25:29    阅读次数:65
1945条   上一页 1 ... 9 10 11 12 13 ... 195 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!