Q:给出一个字符串s,分割s使得分割出的每一个子串都是回文串 计算将字符串s分割成回文分割结果的最小切割数 例如:给定字符串s="aab", 返回1,因为回文分割结果["aa","b"]是切割一次生成的。 A: 动态规划问题。 cut[i] 表示子串(0,i)的最小回文切割,则最优解在cut[s.l ...
分类:
其他好文 时间:
2020-03-13 18:59:48
阅读次数:
57
SHOW INDEX FROM tm_show.tm_order; SHOW CREATE TABLE tm_show.tm_order; CREATE UNIQUE INDEX qianjinyan4ceshi ON tm_show.tm_order (orderNUmber); DROP IND ...
分类:
数据库 时间:
2020-03-13 01:00:50
阅读次数:
69
链接:https://leetcode cn.com/problems/dui lie de zui da zhi lcof/ 代码 ...
分类:
其他好文 时间:
2020-03-12 22:03:55
阅读次数:
78
索引概述在MySQL中,索引由数据表中一列或多列组合而成,创建索引的目的是为了优化数据库的查询速度。其中,用户创建的索引指向数据库中具体数据所在位置。当用户通过索引查询数据库中的数据时,不需要遍历所有数据库中的所有数据。这样,大幅度提高了查询效率。MySQL索引概述1.索引是一种将数据库中单列或者多列的值进行排序的结构。应用索引,可以大幅度提高查询的速度。2.用户通过索引查询数据,不但可以提高查询
分类:
数据库 时间:
2020-03-12 17:11:56
阅读次数:
70
There is a room with n lights which are turned on initially and 4 buttons on the wall. After performing exactly m unknown operations towards buttons, ...
分类:
其他好文 时间:
2020-03-12 14:11:04
阅读次数:
77
课程表二。题意跟207题几乎一样,要求返回你为了学完所有课程所安排的学习顺序。可能会有多个正确的顺序,你只要返回一种就可以了。如果不可能完成所有课程,返回一个空数组。例子, Example 1: Input: 2, [[1,0]] Output: [0,1] Explanation: There a ...
分类:
其他好文 时间:
2020-03-12 11:34:36
阅读次数:
51
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6638 There are nn pirate chests buried in Byteland, labeled by 1,2,…,n1,2,…,n. The ii-th chest's locati ...
分类:
其他好文 时间:
2020-03-12 11:25:40
阅读次数:
49
Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] ...
分类:
其他好文 时间:
2020-03-12 09:53:25
阅读次数:
54
1.1 Mysql数据库的优化技术 1、mysql优化是一个综合性的技术,主要包括 1. 表的设计合理化(符合3NF) 2. 添加适当索引(index) [四种: 普通索引、主键索引、唯一索引unique、全文索引] 3. 分表技术(水平分割、垂直分割) 4. 读写[写: update/delete ...
分类:
数据库 时间:
2020-03-12 09:37:40
阅读次数:
83
A company has n employees with a unique ID for each employee from 0 to n - 1. The head of the company has is the one with headID. Each employee has on ...
分类:
其他好文 时间:
2020-03-12 09:30:59
阅读次数:
74