随笔分类 - 算法
摘要:Algorithm and Data Structure Sec6 Heap Sort 6.1 What is heap? An array which structure is like a tree, and A[parent(i)] >= A[i], or <= MAX_HEAPIFY BUI
阅读全文
摘要:参考链接: 代码随想录 Algorithm Note 基础 数组 67:Sqrt-X 二分查找法: x平方根的整数部分是ans是满足的最大k值,所以我们可以对 进行二分查找。 下界为0,上界可以为x/2。二分查找的每一步,只需要比较中间元素mid的平方与x的大小关系,并通过
阅读全文