代码拉取完成,页面将自动刷新
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="keywords" content="Dawn">
<meta name="description" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit|ie-stand|ie-comp">
<meta name="mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Global site tag (gtag.js) - Google Analytics -->
<title>Dawn</title>
<link rel="icon" type="image/svg+xml" href="/blog/thunder.svg">
<link rel="stylesheet" type="text/css" href="/blog/libs/awesome/css/all.css">
<link rel="stylesheet" type="text/css" href="/blog/libs/materialize/materialize.min.css">
<link rel="stylesheet" type="text/css" href="/blog/libs/aos/aos.css">
<link rel="stylesheet" type="text/css" href="/blog/libs/animate/animate.min.css">
<link rel="stylesheet" type="text/css" href="/blog/libs/lightGallery/css/lightgallery.min.css">
<link rel="stylesheet" type="text/css" href="/blog/css/matery.css">
<link rel="stylesheet" type="text/css" href="/blog/css/my.css">
<script src="/blog/libs/jquery/jquery.min.js"></script>
<meta name="generator" content="Hexo 4.2.0"><link rel="stylesheet" href="/blog/css/prism-tomorrow.css" type="text/css"></head>
<body>
<header class="navbar-fixed">
<nav id="headNav" class="bg-color nav-transparent">
<div id="navContainer" class="nav-wrapper container">
<div class="brand-logo">
<a href="/blog/" class="waves-effect waves-light">
<img src="/blog/thunder.svg" class="logo-img" alt="LOGO">
<span class="logo-span">Dawn</span>
</a>
</div>
<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
<li class="hide-on-med-and-down nav-item">
<a href="/blog/" class="waves-effect waves-light">
<i class="fas fa-home" style="zoom: 0.6;"></i>
<span>首页</span>
</a>
</li>
<li class="hide-on-med-and-down nav-item">
<a href="/blog/tags" class="waves-effect waves-light">
<i class="fas fa-tags" style="zoom: 0.6;"></i>
<span>标签</span>
</a>
</li>
<li class="hide-on-med-and-down nav-item">
<a href="/blog/categories" class="waves-effect waves-light">
<i class="fas fa-bookmark" style="zoom: 0.6;"></i>
<span>分类</span>
</a>
</li>
<li class="hide-on-med-and-down nav-item">
<a href="/blog/archives" class="waves-effect waves-light">
<i class="fas fa-archive" style="zoom: 0.6;"></i>
<span>时间线</span>
</a>
</li>
<li class="hide-on-med-and-down nav-item">
<a href="/blog/contact" class="waves-effect waves-light">
<i class="fas fa-comments" style="zoom: 0.6;"></i>
<span>留言板</span>
</a>
</li>
<li class="hide-on-med-and-down nav-item">
<a href="/blog/friends" class="waves-effect waves-light">
<i class="fas fa-address-book" style="zoom: 0.6;"></i>
<span>推荐链</span>
</a>
</li>
<li class="hide-on-med-and-down nav-item">
<a href="/blog/about" class="waves-effect waves-light">
<i class="fas fa-user-circle" style="zoom: 0.6;"></i>
<span>个人简介</span>
</a>
</li>
<li>
<a href="#searchModal" class="modal-trigger waves-effect waves-light">
<i id="searchIcon" class="fas fa-search" title="Search" style="zoom: 0.85;"></i>
</a>
</li>
</ul>
<div id="mobile-nav" class="side-nav sidenav">
<div class="mobile-head bg-color">
<img src="/blog/thunder.svg" class="logo-img circle responsive-img">
<div class="logo-name">Dawn</div>
<div class="logo-desc">
Never really desperate, only the lost of the soul.
</div>
</div>
<ul class="menu-list mobile-menu-list">
<li class="m-nav-item">
<a href="/blog/" class="waves-effect waves-light">
<i class="fa-fw fas fa-home"></i>
首页
</a>
</li>
<li class="m-nav-item">
<a href="/blog/tags" class="waves-effect waves-light">
<i class="fa-fw fas fa-tags"></i>
标签
</a>
</li>
<li class="m-nav-item">
<a href="/blog/categories" class="waves-effect waves-light">
<i class="fa-fw fas fa-bookmark"></i>
分类
</a>
</li>
<li class="m-nav-item">
<a href="/blog/archives" class="waves-effect waves-light">
<i class="fa-fw fas fa-archive"></i>
时间线
</a>
</li>
<li class="m-nav-item">
<a href="/blog/contact" class="waves-effect waves-light">
<i class="fa-fw fas fa-comments"></i>
留言板
</a>
</li>
<li class="m-nav-item">
<a href="/blog/friends" class="waves-effect waves-light">
<i class="fa-fw fas fa-address-book"></i>
推荐链
</a>
</li>
<li class="m-nav-item">
<a href="/blog/about" class="waves-effect waves-light">
<i class="fa-fw fas fa-user-circle"></i>
个人简介
</a>
</li>
<li><div class="divider"></div></li>
<li>
<a href="https://github.com/Tonited" class="waves-effect waves-light" target="_blank">
<i class="fab fa-github-square fa-fw"></i>My Github
</a>
</li>
</ul>
</div>
</div>
<style>
.nav-transparent .github-corner {
display: none !important;
}
.github-corner {
position: absolute;
z-index: 10;
top: 0;
right: 0;
border: 0;
transform: scale(1.1);
}
.github-corner svg {
color: #0f9d58;
fill: #fff;
height: 64px;
width: 64px;
}
.github-corner:hover .octo-arm {
animation: a 0.56s ease-in-out;
}
.github-corner .octo-arm {
animation: none;
}
@keyframes a {
0%,
to {
transform: rotate(0);
}
20%,
60% {
transform: rotate(-25deg);
}
40%,
80% {
transform: rotate(10deg);
}
}
</style>
<a href="https://github.com/Tonited" class="github-corner tooltipped hide-on-med-and-down" target="_blank"
data-tooltip="My Github" data-position="left" data-delay="50">
<svg viewBox="0 0 250 250" aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
fill="currentColor" class="octo-body"></path>
</svg>
</a>
</nav>
</header>
<style>
.carousel-control {
width: 45px;
height: 45px;
line-height: 55px;
border-radius: 45px;
background: transparent;
cursor: pointer;
z-index: 100;
}
#prev-cover {
position: absolute;
top: 48%;
left: 8px;
}
#next-cover {
position: absolute;
top: 48%;
right: 8px;;
}
#prev-cover i {
margin-right: 3px;
}
#next-cover i {
margin-left: 3px;
}
.carousel-control:hover {
background-color: rgba(0, 0, 0, .4);
}
.carousel-control i {
color: #fff;
font-size: 2.4rem;
}
</style>
<div class="carousel carousel-slider center index-cover" data-indicators="true" style="margin-top: -64px;">
<div class="carousel-item red white-text bg-cover about-cover">
<div class="container">
<div class="row">
<div class="col s10 offset-s1 m8 offset-m2 l8 offset-l2">
<div class="brand">
<div class="title center-align">
Dawn
</div>
<div class="description center-align">
<span id="subtitle"></span>
<script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11"></script>
<script>
var typed = new Typed("#subtitle", {
strings: ['传说之后笑把霜尘卸下 驻马处皆故里 深巷卖杏花','疏影横斜水清浅 暗香浮动月黄昏'],
startDelay: 300,
typeSpeed: 100,
loop: true,
backSpeed: 50,
showCursor: true
});
</script>
</div>
</div>
</div>
</div>
<script>
// 每天切换 banner 图. Switch banner image every day.
$('.bg-cover').css('background-image', 'url(/blog/medias/banner/1.jpg)');
</script>
<div class="cover-btns">
<a href="#indexCard" class="waves-effect waves-light btn">
<i class="fa fa-angle-double-down"></i>Start
</a>
<a href="https://github.com/Tonited" class="waves-effect waves-light btn" target="_blank">
<i class="fab fa-github-alt"></i>Github
</a>
</div>
<div class="cover-social-link">
<a href="https://github.com/tonited" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
<i class="fab fa-github"></i>
</a>
<a href="mailto:tonited@tom.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
<i class="fas fa-envelope-open"></i>
</a>
<!--
-->
<a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=710260712" class="tooltipped" target="_blank" data-tooltip="QQ联系我: 710260712" data-position="top" data-delay="50">
<i class="fab fa-qq"></i>
</a>
<!--
<a href="/blog/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
<i class="fas fa-rss"></i>
</a>
-->
</div>
</div>
</div>
</div>
<script>
$(function () {
let coverSlider = $('.carousel');
//用户触摸轮播自动 restartPlay 是否生效
let initUserPressedOrDraggedActive = false
//用户触摸轮播自动 restartPlay
function initUserPressedOrDragged(instance) {
setInterval(() => {
if (instance.pressed || instance.dragged) {
// console.log('initUserPressedOrDragged: ',instance.pressed,instance.dragged)
restartPlay()
}
}, 1000)
}
coverSlider.carousel({
duration: Number('120'),
fullWidth: true,
indicators: 'true' === 'true',
onCycleTo() {
if (!initUserPressedOrDraggedActive) {
// console.log('initUserPressedOrDraggedActive')
initUserPressedOrDragged(this)
initUserPressedOrDraggedActive = true
}
},
})
let carouselIntervalId;
// Loop to call the next cover article picture.
let autoCarousel = function () {
carouselIntervalId = setInterval(function () {
coverSlider.carousel('next');
}, 5000);
};
autoCarousel();
function restartPlay() {
clearInterval(carouselIntervalId);
autoCarousel();
};
// prev and next cover post.
$('#prev-cover').click(function () {
coverSlider.carousel('prev');
restartPlay();
});
$('#next-cover').click(function () {
coverSlider.carousel('next');
restartPlay();
});
});
</script>
<main class="content">
<div id="indexCard" class="index-card">
<div class="container ">
<div class="card">
<div class="card-content">
<div class="dream">
<div class="title center-align">
<i class="far fa-lightbulb"></i> 小世界
</div>
<div class="row">
<div class="col l8 offset-l2 m10 offset-m1 s10 offset-s1 center-align text">
这是一个私人小博客,在这个博客中,我会记录在学习过程中遇到的新技术、对所遇到问题的思考与见解,搬运优秀的文章,主要侧重于记录“思想”,而一些琐碎的知识例如程序报错等,我会放到我的CSDN博客上(在推荐链中)。我会对搬运来的文章进行一定的修改使之便于理解,所以如果文章出了什么问题一般是我的原因,如果发现了问题欢迎大家联系我。我也会记录生活中的一些故事,在这里大家可以看到一名普通的学生成长为一名优秀的架构师,最后成为技术总监的历程(笑)。欢迎大家来参观、学习、交流。
</div>
</div>
</div>
<div id="recommend-sections" class="recommend">
</div>
</div>
</div>
</div>
</div>
<!-- 所有文章卡片 -->
<article id="articles" class="container articles">
<div class="row article-row">
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/06/08/mian-xiang-dui-xiang-gai-nian/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/20200608123744219.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzU1MzY5NA==,size_16,color_FFFFFF,t_70" class="responsive-img" alt="面向对象概念">
<span class="card-title">面向对象概念</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
概述什么是面向对象(Object-Oriented,OO)观点?为什么一个方法被认 为是面向对象的?什么是对象?在20 世纪80 年代和90 年代,面向对象 概念赢得了广泛的传播,在那时,关于这些问题的答案有很多不同观点, 但是今天关于
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-06-08
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B/" class="post-category">
软件工程
</a>
</span>
</div>
</div>
<div class="card-action article-tags">
<a href="/blog/tags/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%EF%BC%9A%E5%AE%9E%E8%B7%B5%E8%80%85%E7%9A%84%E7%A0%94%E7%A9%B6%E6%96%B9%E6%B3%95/">
<span class="chip bg-color">软件工程:实践者的研究方法</span>
</a>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/31/uml-jian-jie/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/20200531143505991.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzU1MzY5NA==,size_16,color_FFFFFF,t_70" class="responsive-img" alt="UML简介">
<span class="card-title">UML简介</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
简介统一建模语言(Unified Modeling Language,UML)是“绘制软件蓝图的标准化语言。UML 用来可视化、描述、构造和文档化软件密集系统的 人工制品”[Boo05]。如果了 解 UML 的词汇(图示元素和它们的含义
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-31
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B/" class="post-category">
软件工程
</a>
</span>
</div>
</div>
<div class="card-action article-tags">
<a href="/blog/tags/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%EF%BC%9A%E5%AE%9E%E8%B7%B5%E8%80%85%E7%9A%84%E7%A0%94%E7%A9%B6%E6%96%B9%E6%B3%95/">
<span class="chip bg-color">软件工程:实践者的研究方法</span>
</a>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/28/fen-zhi-kai-fa-gong-zuo-liu/">
<div class="card-image">
<img src="https://gitee.com/tonited/qfdmy/raw/master/Java%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6%E7%B3%BB%E7%BB%9F-Git&GitHub/Git%E5%88%86%E6%94%AF/assets/%E5%88%86%E6%94%AF%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E6%B5%81/git-workflow-release-cycle-3release.png" class="responsive-img" alt="分支开发工作流">
<span class="card-title">分支开发工作流</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
Git 工作流简介概述工作流有各式各样的用法,但也正因此使得在实际工作中如何上手使用增加了难度。这篇指南通过总览公司团队中最常用的几种 Git 工作流让大家可以上手使用。
在阅读的过程中请记住,本文中的几种工作流是作为方案指导而不是条例规定
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-28
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E7%BC%96%E7%A8%8B%E7%9F%A5%E8%AF%86/" class="post-category">
编程知识
</a>
</span>
</div>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/25/sui-ji-xuan-ze-suan-fa/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/20200525135226377.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzU1MzY5NA==,size_16,color_FFFFFF,t_70" class="responsive-img" alt="随机选择算法">
<span class="card-title">随机选择算法</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
问题如何从一个无序数组中求出第 K 大的数(为了简化讨论,假设数组中的数各不相同)。
例如,对数组 { 5,12,7,2,9,3 }来说,第三大的是 5,第五大的是 9
随机选择算法概念最直接的想法是对数组排序,然后取出第 K 个。这样做法
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-25
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" class="post-category">
数据结构与算法
</a>
</span>
</div>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/23/huo-yong-di-tui/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/2020020316370168.png" class="responsive-img" alt="活用递推">
<span class="card-title">活用递推</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
许多题目需要细心考虑是否可能用到递推关系
例如就一类涉及序列的题目来说。假如 序列的每一位所需要计算的值 都可以通过 该位左右两侧的计算结果得到,那就可以考虑所谓的“左右两侧的结果”是否可以通过递推进行预处理来得到,这样在后面的使用中就可以
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-23
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" class="post-category">
数据结构与算法
</a>
</span>
</div>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/23/da-biao/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/2020020316370168.png" class="responsive-img" alt="打表">
<span class="card-title">打表</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
打表是典型的 空间换时间,一般指将所有可能需要用到的结果事先计算出来存入表,后面如果需要就直接查表。
常见方法有以下几种:
程序中一次性计算所有需要用到的结果,之后需要用到直接取
最常用的方法
如一个大量查询 Fibonacci 数 F
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-23
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" class="post-category">
数据结构与算法
</a>
</span>
</div>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/19/two-pointer-kuai-su-pai-xu/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/20200519071452379.png" class="responsive-img" alt="Two Pointer:快速排序">
<span class="card-title">Two Pointer:快速排序</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
首先解决的问题快速排序平均时间复杂度 O(nlogn)
它的实现要先解决解决了这样的一个问题:
对一个序列 A[1]、A[2]、……、A[n]。调整序列中元素的位置,使得 A[1](原序列的 A[1],下同)的左侧所有元素都不超过 A[1
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-19
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" class="post-category">
数据结构与算法
</a>
</span>
</div>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/17/two-pointer/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/20200517134635702.png" class="responsive-img" alt="Two Pointer">
<span class="card-title">Two Pointer</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
很少有教材拿出来讲,因为Tow Pointer不像是一种算法,更像是一种编程思想
广义上的 Two Pointer 是利用问题本身与序列的特性,使用下标 i, j 对序列进行扫描,以较低复杂度(一般是O(n))解决问题
给出以下两个例子
找
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-17
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" class="post-category">
数据结构与算法
</a>
</span>
</div>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/17/two-pointer-gui-bing-pai-xu/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/20200517150805559.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzU1MzY5NA==,size_16,color_FFFFFF,t_70" class="responsive-img" alt="Two Pointer:归并排序">
<span class="card-title">Two Pointer:归并排序</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
归并排序是一种基于“归并”思想的排序方法,本节主要介绍其中最基本的2-路归并排序。
2-路归并排序的原理是,将序列两两分组,将序列归并为 n/2 个组,组内单独排序;然后将这些组再两两归并,生成 n/4 个组,组内再单独排序;以此类推,直到
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-17
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" class="post-category">
数据结构与算法
</a>
</span>
</div>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/15/er-fen-kuai-su-mi/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/20200512143702758.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzU1MzY5NA==,size_16,color_FFFFFF,t_70" class="responsive-img" alt="二分:快速幂">
<span class="card-title">二分:快速幂</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
问题
给定三个正整数 a、b、m( a<$10^9$,b<$10^6$,1<m<$10^9$),求 $a^b$ % m 的值
一般写法为了防止溢出使用long,Java代码,long为64位,等同于 C语言 的 l
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-15
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" class="post-category">
数据结构与算法
</a>
</span>
</div>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/15/dan-jin-cheng-si-suo-shi-li/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/20200515125326604.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzU1MzY5NA==,size_16,color_FFFFFF,t_70" class="responsive-img" alt="单进程死锁示例">
<span class="card-title">单进程死锁示例</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
当无 IO Buffer 时有可能出现单进程死锁
进程1 向 IO 请求数据,并告诉IO设备 返回的数据 应该送到 进程1 的哪个地址
IO设备去IO数据了,进程1就会阻塞等待,这时如果 进程1 被挂起,IO设备并不知道 进程1 被挂起
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-15
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E7%BC%96%E7%A8%8B%E7%9F%A5%E8%AF%86/" class="post-category">
编程知识
</a>
</span>
</div>
</div>
</div>
</div>
<div class="article col s12 m6 l4" data-aos="zoom-in">
<div class="card">
<a href="/blog/2020/05/12/er-fen-xun-zhao-you-xu-shu-lie-di-yi-ge-man-zu-mou-tiao-jian-de-yuan-su-de-wei-zhi/">
<div class="card-image">
<img src="https://img-blog.csdnimg.cn/20200512143702758.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzU1MzY5NA==,size_16,color_FFFFFF,t_70" class="responsive-img" alt="二分:寻找有序数列第一个满足某条件的元素的位置">
<span class="card-title">二分:寻找有序数列第一个满足某条件的元素的位置</span>
</div>
</a>
<div class="card-content article-content">
<div class="summary block-with-text">
问题有这样的问题:如果递增序列 A 中的元素可能重复,那么如何对给定的欲查询元素x,求出序列中第一个大于等于x的元素的位置L以及第一个大于x 的元素的位置R。
序列中第一个大于等于x的元素的位置先看第一问
例如对下标从0开始、有5个元素的序
</div>
<div class="publish-info">
<span class="publish-date">
<i class="far fa-clock fa-fw icon-date"></i>2020-05-12
</span>
<span class="publish-author">
<i class="fas fa-bookmark fa-fw icon-category"></i>
<a href="/blog/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" class="post-category">
数据结构与算法
</a>
</span>
</div>
</div>
</div>
</div>
</div>
</article>
</main>
<div class="container paging">
<div class="row">
<div class="col s6 m4 l4">
<a class="left btn-floating btn-large disabled">
<i class="fas fa-angle-left"></i>
</a>
</div>
<div class="page-info col m4 l4 hide-on-small-only">
<div class="center-align b-text-gray">1 / 5</div>
</div>
<div class="col s6 m4 l4">
<a href="/blog/page/2/"
class="right btn-floating btn-large waves-effect waves-light bg-color">
<i class="fas fa-angle-right"></i>
</a>
</div>
</div>
</div>
<footer class="page-footer bg-color">
<link rel="stylesheet" href="/blog/libs/aplayer/APlayer.min.css">
<style>
.aplayer .aplayer-lrc p {
font-size: 12px;
font-weight: 700;
line-height: 16px !important;
}
.aplayer .aplayer-lrc p.aplayer-lrc-current {
font-size: 15px;
color: #42b983;
}
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
left: -66px !important;
}
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body:hover {
left: 0px !important;
}
</style>
<div class="">
<div class="row">
<meting-js class="col l8 offset-l2 m10 offset-m1 s12"
server="netease"
type="playlist"
id="705997262"
fixed='true'
autoplay='false'
theme='#42b983'
loop='all'
order='random'
preload='auto'
volume='0.7'
list-folded='true'
>
</meting-js>
</div>
</div>
<script src="/blog/libs/aplayer/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>
<div class="container row center-align" style="margin-bottom: 0px !important;">
<div class="col s12 m8 l8 copy-right">
Copyright ©
<span id="year">2019</span>
<a href="/blog/about" target="_blank">Tonited</a>
| Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
| Theme <a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">Matery</a>
<br>
<i class="fas fa-chart-area"></i> 站点总字数: <span
class="white-color">127.9k</span> 字
<span id="busuanzi_container_site_pv">
| <i class="far fa-eye"></i> 总访问量: <span id="busuanzi_value_site_pv"
class="white-color"></span> 次
</span>
<span id="busuanzi_container_site_uv">
| <i class="fas fa-users"></i> 总访问人数: <span id="busuanzi_value_site_uv"
class="white-color"></span> 人
</span>
<br>
<br>
</div>
<div class="col s12 m4 l4 social-link social-statis">
<a href="https://github.com/tonited" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
<i class="fab fa-github"></i>
</a>
<a href="mailto:tonited@tom.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
<i class="fas fa-envelope-open"></i>
</a>
<!--
-->
<a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=710260712" class="tooltipped" target="_blank" data-tooltip="QQ联系我: 710260712" data-position="top" data-delay="50">
<i class="fab fa-qq"></i>
</a>
<!--
<a href="/blog/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
<i class="fas fa-rss"></i>
</a>
-->
</div>
</div>
</footer>
<div class="progress-bar"></div>
<!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
<div class="modal-content">
<div class="search-header">
<span class="title"><i class="fas fa-search"></i> Search</span>
<input type="search" id="searchInput" name="s" placeholder="Please enter a search keyword"
class="search-input">
</div>
<div id="searchResult"></div>
</div>
</div>
<script src="/blog/js/search.js"></script>
<script type="text/javascript">
$(function () {
searchFunc("/blog/search.xml", 'searchInput', 'searchResult');
});
</script>
<!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
<a class="btn-floating btn-large waves-effect waves-light" href="#!">
<i class="fas fa-arrow-up"></i>
</a>
</div>
<script src="/blog/libs/materialize/materialize.min.js"></script>
<script src="/blog/libs/masonry/masonry.pkgd.min.js"></script>
<script src="/blog/libs/aos/aos.js"></script>
<script src="/blog/libs/scrollprogress/scrollProgress.min.js"></script>
<script src="/blog/libs/lightGallery/js/lightgallery-all.min.js"></script>
<script src="/blog/js/matery.js"></script>
<!-- Baidu Analytics -->
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?755c2de4f6fc88f6895d0f52250b4548";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<!-- Baidu Push -->
<script>
(function () {
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
} else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
<script src="/blog/libs/others/clicklove.js" async="async"></script>
<script async src="/blog/libs/others/busuanzi.pure.mini.js"></script>
<script type="text/javascript" color="0,0,255"
pointColor="0,0,255" opacity='0.7'
zIndex="-1" count="99"
src="/blog/libs/background/canvas-nest.js"></script>
<script type="text/javascript" src="/blog/libs/background/ribbon-dynamic.js" async="async"></script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。