码迷,mamicode.com
首页 >  
搜索关键字:unique    ( 4837个结果
Leetcode | Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:其他好文   时间:2014-05-16 21:15:37    阅读次数:454
Leetcode 树 Unique Binary Search TreesII
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Unique Binary Search Trees II  Total Accepted: 7349 Total Submissions: 27648 Given n, generate all structurally unique ...
分类:其他好文   时间:2014-05-15 07:02:36    阅读次数:252
LeetCode-005 Longest Palindromic Substrin
【题目】 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 【题意】 题意是找出字符串S中最长回文子串,S最长为1000,保证有唯一解 【思路】 原字符串用特殊字符#间隔,如下所示: #a...
分类:其他好文   时间:2014-05-15 03:31:25    阅读次数:299
LeetCode之Unique Binary Search Trees
Unique Binary Search Trees, Given n, how many structurally unique BST's (binary search trees) that store values 1...n?...
分类:其他好文   时间:2014-05-15 02:32:11    阅读次数:245
Leetcode: Unique Paths
这道题最开始采用recursive的方法,结果犯了TLE(time limit exceeded)的错误,事实证明recursive的时间代价还是太高,所以改用DP的方法,把曾经算出来的结果存起来,我用的是一个M*N的matrix来存储 1 public class Solution { 2 ...
分类:其他好文   时间:2014-05-14 10:57:31    阅读次数:245
leetcode第一刷_Unique Paths
从左上到右下,只能向右或向下,问一共有多少种走法。 这个问题当然可以用递归和dp来做,递归的问题是很可能会超时,dp的问题是需要额外空间。 其实没有其他限制条件的话,这个问题有个很简单的解法。给定一个格子,假设是m*n的,从左上角走到右下角的总步数是确定了的,(m+n-2)嘛,即在竖直方向一定要走m-1步,在水平方向一定要走n-1步。那有多少种解法就相当于确定什么时候往下走,什么时候往右走,也...
分类:其他好文   时间:2014-05-14 00:41:02    阅读次数:447
c++ 名字粉碎(name mangling)
转自Ibm:Name mangling is the encoding of function and variable names into unique names so that linkers can separate common names in the language. Type n...
分类:编程语言   时间:2014-05-13 18:18:53    阅读次数:421
Leetcode 树 Unique Binary Search Trees
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Unique Binary Search Trees  Total Accepted: 13478 Total Submissions: 37858 Given n, how many structurally unique BST's (bin...
分类:其他好文   时间:2014-05-13 15:21:22    阅读次数:291
关联容器 — hash_set
容器hash_set是以hash table为底层机制的,几乎所有的操作都是转调用hash table提供的接口。由于插入无法存储相同的键值,所以hash_set的插入操作全部都使用hash table的insert_unique接口,代码如下: pair insert(const value_type& obj) { pair p = rep.insert_unique(obj); ...
分类:其他好文   时间:2014-05-13 06:33:44    阅读次数:303
数据库索引类型和引擎
数据库索引类型和引擎一、数据库索引1、索引的优缺点优点:能够加快查询速度(相当于书的目录)缺点:会降低插入、更新表的速度,需要占用磁盘存储空间2、索引的类型INDEX:普通索引UNIQUE:唯一索引FULLTEXT:全文索引PRIMARYKEY:主键FOREIGNKEY:外键*不同的索引有不同的作..
分类:数据库   时间:2014-05-13 00:52:56    阅读次数:1435
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!