Files
CategoryResourceRepost/极客时间专栏/数据结构与算法之美/加餐:春节7天练/春节7天练 | Day 3:排序和二分查找.md
louzefeng d3828a7aee mod
2024-07-11 05:50:32 +00:00

42 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<audio id="audio" title="春节7天练 | Day 3排序和二分查找" controls="" preload="none"><source id="mp3" src="https://static001.geekbang.org/resource/audio/73/c3/73790422142ab8c78d6e8e5c1f1c3cc3.mp3"></audio>
你好,我是王争。初三好!
为了帮你巩固所学真正掌握数据结构和算法我整理了数据结构和算法中必知必会的30个代码实现分7天发布出来供你复习巩固所用。今天是第三篇。
和昨天一样,你可以花一点时间,来完成测验。测验完成后,你可以根据结果,回到相应章节,有针对性地进行复习。
前两天的内容,是关于数组和链表、排序和二分查找的。如果你错过了,点击文末的“上一篇”,即可进入测试。
## 关于排序和二分查找的几个必知必会的代码实现
### 排序
<li>
实现归并排序、快速排序、插入排序、冒泡排序、选择排序
</li>
<li>
编程实现O(n)时间复杂度内找到一组数据的第K大元素
</li>
### 二分查找
<li>
实现一个有序数组的二分查找算法
</li>
<li>
实现模糊二分查找算法(比如大于等于给定值的第一个元素)
</li>
## 对应的LeetCode练习题@Smallfly 整理)
- Sqrt(x) x 的平方根)
英文版:[https://leetcode.com/problems/sqrtx/](https://leetcode.com/problems/sqrtx/)
中文版:[https://leetcode-cn.com/problems/sqrtx/](https://leetcode-cn.com/problems/sqrtx/)
做完题目之后,你可以点击“请朋友读”,把测试题分享给你的朋友,说不定就帮他解决了一个难题。
祝你取得好成绩!明天见!