在C++11中有两个智能指针类型来管理动态对象,share_ptr允许多个指针指向同一个对象,unique_ptr则“独占”所指对象。 我们知道指针或引用在离开作用域时是不会进行析构的,但是类在离开作用域时会自动执行析构函数,所以我们可以用一个类来实现指针指针(unique_ptr本质上是一个类,只 ...
分类:
其他好文 时间:
2018-12-03 13:59:29
阅读次数:
808
一、题目:计算各个位数不同的数字个数 给定一个非负整数 n,计算各位数字都不同的数字 x 的个数,其中 0 ≤ x < 10n 。 示例: 思路:动态规划 dp[i]表示 i 位数范围内【0,10^i】各位数字都不同的数字 x 的个数。 当 n = 1 时, 只有 0 符合条件, 当 n = 10 ...
分类:
编程语言 时间:
2018-12-03 12:46:48
阅读次数:
223
For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip e ...
分类:
其他好文 时间:
2018-12-02 22:51:17
阅读次数:
243
In a deck of cards, every card has a unique integer. You can order the deck in any order you want. Initially, all the cards start face down (unreveale ...
分类:
其他好文 时间:
2018-12-02 22:48:37
阅读次数:
279
原文地址:http://www.vonwei.com/post/UniqueDeviceIDforWindows.html 原文地址:http://www.vonwei.com/post/UniqueDeviceIDforWindows.html 唯一的标识一个设备是一个基本功能,可以拥有很多应用场 ...
说明:对于一个生鲜的B2B平台而言,通知对于我们实际的运营而言来讲分为三种方式: 1. 消息推送:(采用极光推送) 2. 主页弹窗通知。(比如:现在有什么新的活动,有什么新的优惠等等) 3. 短信通知.(对于短信通知,这个大家很熟悉,我们就说下我们如何从代码层面对短信进行分层的分析与架构) 1. 消 ...
分类:
其他好文 时间:
2018-12-02 12:28:27
阅读次数:
156
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p ...
分类:
其他好文 时间:
2018-12-02 10:31:29
阅读次数:
161
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p ...
分类:
其他好文 时间:
2018-12-02 01:22:49
阅读次数:
221
HyperLegerFabricSDK开发(八)——msp一、msp简介1、msp简介msp支持在Fabric网络上创建和更新用户。MSP客户端支持以下操作:Enroll,Reenroll,Register,Revoke和GetSigningIdentity。官方文档:https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client
分类:
其他好文 时间:
2018-12-02 00:34:03
阅读次数:
340
骨干网、 ATM X.25 ITU_T SDH、MSTP、OTN和PTN的区别和联系 SDH、MSTP、OTN和PTN的区别和联系 ...
分类:
其他好文 时间:
2018-12-01 17:01:55
阅读次数:
177