随笔分类 -  数据结构

摘要:(B树)B-树 是一种多路搜索树(并不是二叉的): 1.定义任意非叶子结点最多只有M个儿子;且M>2; 2.根结点的儿子数为[2, M]; 3.除根结点以外的非叶子结点的儿子数为[M/2, M]; 4.每个结... 阅读全文
posted @ 2019-03-23 23:06 strawqqhat 阅读(202) 评论(0) 推荐(0)
摘要:AVL树(http://baike.baidu.com/view/593144.htm?fr=aladdin),又称(严格)高度平衡的二叉搜索树。其他的平衡树还有:红黑树、Treap、伸展树、SBT。 注:使用 "nil 叶子"或"空(null)叶子",它不包含数据而... 阅读全文
posted @ 2019-03-20 08:59 strawqqhat 阅读(155) 评论(0) 推荐(0)
摘要:前言快速排序是一种很重要的排序算法,我花了不少时间去理解并总结它,希望可以通过图文的方式让你快速理解快速排序,并能手撸一个快排。快速排序简介快速排序是一种很不错的排序算法,算法复杂度为n*logn。快排使用了分而治之的思想,每次排序是都找到一个基准(我们学习时经常使用... 阅读全文
posted @ 2019-03-19 18:21 strawqqhat 阅读(261) 评论(0) 推荐(0)
摘要:遍历法static Node reverse(Node head){ if(head == null){ return null; } Node pre = head; Node cur = head; Node reHead = null; //如... 阅读全文
posted @ 2019-03-19 18:19 strawqqhat 阅读(186) 评论(0) 推荐(0)
摘要:C++ 值传递、指针传递、引用传递详解最近写了几篇深层次讨论数组和指针的文章,其中提到了“C语言中,所有非数组的形式参数传递均以值传递形式”数组和指针背后——内存角度语义"陷阱"---数组和指针而关于值传递,指针传递,引用传递这几个方面还会存在误区, 所有我觉的有必要... 阅读全文
posted @ 2018-08-18 13:50 strawqqhat 阅读(144) 评论(0) 推荐(0)

#home h1{ font-size:45px; } body{ background-image: url("放你的背景图链接"); background-position: initial; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-origin: initial; background-clip: initial; height:100%; width:100%; } #home{ opacity:0.7; } .wall{ position: fixed; top: 0; left: 0; bottom: 0; right: 0; } div#midground{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -1; -webkit-animation: cc 200s linear infinite; -moz-animation: cc 200s linear infinite; -o-animation: cc 200s linear infinite; animation: cc 200s linear infinite; } div#foreground{ background: url("https://i.postimg.cc/z3jZZD1B/foreground.png"); z-index: -2; -webkit-animation: cc 253s linear infinite; -o-animation: cc 253s linear infinite; -moz-animation: cc 253s linear infinite; animation: cc 253s linear infinite; } div#top{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -4; -webkit-animation: da 200s linear infinite; -o-animation: da 200s linear infinite; animation: da 200s linear infinite; } @-webkit-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-o-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-moz-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @keyframes cc { 0%{ background-position: 0 0; } 100%{ background-position: 600% 0; } } @keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-webkit-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-moz-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-ms-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } }