![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Algorithm
文章平均质量分 55
iteye_3352
这个作者很懒,什么都没留下…
展开
-
数据库之索引(Index)
在数据之外,数据库系统还维护着满足特定查找算法的数据结构。 这些数据结构以某种方式引用(指向)数据。 这样就可以在这些数据结构上实现高级查找算法。 ——这种数据结构,就是索引。 数据库索引是数据库管理系统中一个排序的数据结构。以协助快速查询、更新数据库表中数据。 为表设置索引要付出代价的, 一是:增加了数据库的存储空间。 二是:在插入和修改数据时要花费较多的时间(因为...原创 2016-12-03 12:04:38 · 332 阅读 · 0 评论 -
Algorithm之二分枚举之copy books
[color=green][size=medium][b]copy books[/b][/size][/color] Before the invention of book-printing, it was very hard to make a copy of a book. All the contents had to be re-written by hand by so call...原创 2017-01-13 16:29:06 · 191 阅读 · 0 评论 -
Algorithm之动态规划之最佳买股票时机
[color=green][size=medium][b]动态规划(DP: Dynamic Programming)[/b][/size][/color] [size=medium][b]一、基本思想与策略[/b][/size] 基本思想与分治法类似,也是将待求解的问题 - 分解为若干个子问题(阶段) - 按顺序求解子问题, - 前一个(或前有限个,一般不...原创 2017-01-16 14:22:12 · 124 阅读 · 0 评论 -
Algorithm之排序之归并排序
[color=green][size=medium][b]Algorithm之排序之归并排序[/b][/size][/color] [size=medium][b]一、归并介绍[/b][/size] 动画1: [img]http://dl2.iteye.com/upload/attachment/0122/6931/509b2211-9b80-33bd-aab5-bbac401346...原创 2017-01-18 20:54:31 · 136 阅读 · 0 评论 -
Algorithm之排序之堆排序(Heap Sort)
[color=green][size=medium][b]Algorithm之排序之堆排序(Heap Sort)[/b][/size][/color] [size=medium][b]一、什么是堆[/b][/size] 在讲述堆之前,首先看一下二叉树。 二叉树: 每个节点最多有两个子节点,且这两个子节点有左右次序之分。 [b]1、满二叉树[/b] 二叉树的所有非叶子...原创 2017-01-20 16:05:52 · 190 阅读 · 0 评论 -
Algorithm之二分治应用之pow(x,n)
[size=medium][b]设计算法,求 x 的 n 次幂:pow(x, n)[/b][/size] [b]算法一[/b] [code="java"] public class Solution { /* * Solution 1: Time Limit Exceeded * * Test Case: * ...原创 2017-01-23 08:36:27 · 178 阅读 · 0 评论 -
Algorithm之3sum closest及负数在Java中的表示
[b][size=medium][color=green]由一道算法题想到的[/color][/size][/b] [b]1、16. 3Sum Closest[/b] Given an array S of n integers, find three integers in S such that the sum is closest to a given number, tar...原创 2017-01-23 14:41:39 · 127 阅读 · 0 评论 -
Algorithm之Unique Path
经典排列组合与动态规划题 [size=medium][b]一、原题:[/b][/size] [code="java"] // https://leetcode.com/problems/unique-paths/ /* A robot is located at the top-left corner of a m x ...原创 2017-02-03 16:15:33 · 124 阅读 · 0 评论