摘要:
#include <iostream> #include <vector> #include <algorithm> // for std::swap // 冒泡排序 void bubbleSort(std::vector<int>& arr) { int n = arr.size(); for ( 阅读全文
posted @ 2026-07-15 20:12
Acyclonepl
阅读(5)
评论(0)
推荐(0)
摘要:
class Solution { public: int singleNonDuplicate(vector<int>& nums) { /*r 初始化为 k,它表示可能的第一个异常配对索引的上界。 如果所有配对都正常,那么第一个异常配对并不存在,此时答案就是最后一个单独元素, 可以认为“虚拟”的异 阅读全文
posted @ 2026-07-15 19:01
Acyclonepl
阅读(3)
评论(0)
推荐(0)

浙公网安备 33010602011771号