后端

Editorial for Codeforces Round #748 (Div.3)

Editorial for Codeforces Round #748 (Div.3) 1593A - Elections 解法:模拟 **时间复杂度 O(1), 空间复杂度 O(1) #include<bits/stdc++.h> using namespace std; #define endl '\n' const int N = 4E5 + 5; void solve() {

LeetCode-173-二叉搜索树迭代器

二叉搜索树迭代器 题目描述:实现一个二叉搜索树迭代器类BSTIterator ,表示一个按中序遍历二叉搜索树(BST)的迭代器: BSTIterator(TreeNode root) 初始化 BSTIterator 类的一个对象。BST 的根节点 root 会作为构造函数的一部分给出。指针应初始化为一个不存在于 BST 中的数字,且该数字小于 BST 中的任何元素。 boolean hasNe