摘要:
C++示例程序: class Solution { public: void rotate(vector& nums, int k) { int length = nums.size(); if (length & nums, int start, int end) { int temp = 0; 阅读全文
摘要:
C++示例程序: 阅读全文
摘要:
C++示例程序: class Solution { public: int removeDuplicates(vector& nums) { if (nums.empty()) { return 0; } int number = 0; for (int i = 0; i 阅读全文
摘要:
1. 最大堆结构定义如下: 2. 最大堆的基本操作函数如下: MaxHeap createMaxHeap(int capacity); // 创建最大堆 bool isFull(MaxHeap maxHeap); // 判断最大堆是否已满) bool isEmpty(MaxHeap maxHeap) 阅读全文