https://leetcode.com/problems/unique-binary-search-trees/ Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? ...
分类:
其他好文 时间:
2019-05-06 19:00:05
阅读次数:
117
A: Unique Paths II Medium 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 eit ...
分类:
其他好文 时间:
2019-05-05 23:40:11
阅读次数:
184
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the ...
分类:
编程语言 时间:
2019-05-05 14:41:47
阅读次数:
164
Django模型类的Meta是一个内部类,它用于定义一些Django模型类的行为特性。而可用的选项大致包含以下几类: 1,unique_together unique_together这个选项用于:当你需要通过两个字段保持唯一性时使用。比如假设你希望,一个Person的FirstName和LastN ...
分类:
Web程序 时间:
2019-05-04 14:53:16
阅读次数:
216
1. 几种智能指针 1. auto_ptr: c++11中推荐不使用他(放弃) 2. shared_ptr: 每添加一次引用 就+1,减少一次引用,就-1;做到指针进行共享 3. unique_ptr: 一个指针同时只能有一个使用者使用 4. weaked_ptr: 与shared_ptr搭配使用 ...
分类:
编程语言 时间:
2019-05-02 21:48:23
阅读次数:
209
使用STL算法离散化: 思路:先排序,再删除重复元素,然后就是索引元素离散化后对应的值。 1. unique(): 头文件为algorithm unique的作用是“去掉”容器中相邻元素的重复元素(不一定要求数组有序),它会把重复的元素添加到容器末尾(所以数组大小并没有改变),而返回值是去重之后的尾 ...
分类:
其他好文 时间:
2019-05-01 18:48:50
阅读次数:
150
Given a set of candidate numbers (`candidates`) (without duplicates) and a target number (`target`), find all unique combinations in `candidates` wh... ...
分类:
其他好文 时间:
2019-04-30 19:53:06
阅读次数:
151
坐标型 115. Unique Paths II https://www.lintcode.com/problem/unique-paths-ii/description?_from=ladder&&fromId=16 public class Solution { /** * @param obs ...
分类:
其他好文 时间:
2019-04-30 19:46:20
阅读次数:
257