合并果子(python) 摘要:解题思路:注意事项:参考代码:import heapqdef mergeFruits(fruits): heap = [] for fruit in fruits: heap…… 题解列表 2023年12月17日 0 点赞 0 评论 375 浏览 评分:0.0
二叉树遍历(python) 摘要:解题思路:注意事项:参考代码:# 定义树节点的数据结构class TreeNode: def __init__(self, val): self.val = val …… 题解列表 2023年12月17日 0 点赞 0 评论 442 浏览 评分:8.0
求后序遍历 摘要:解题思路:注意事项:参考代码:# 定义树节点的数据结构class TreeNode: def __init__(self, val): self.val = val …… 题解列表 2023年12月17日 0 点赞 0 评论 401 浏览 评分:0.0
求后序遍历(python) 摘要:解题思路:注意事项:参考代码:def build_tree(preorder, inorder): if not preorder or not inorder: return N…… 题解列表 2023年12月17日 0 点赞 0 评论 396 浏览 评分:0.0
单词查找树(python) 摘要:解题思路:注意事项:参考代码:class TrieNode: def __init__(self): self.children = {} self.is_end_o…… 题解列表 2023年12月17日 0 点赞 0 评论 395 浏览 评分:0.0
sort和unique轻松解决 摘要: #include using namespace std; #define ll long long const int maxn = 1e6 + 50; …… 题解列表 2023年12月17日 0 点赞 0 评论 448 浏览 评分:9.9
1738:排序(C语言)(交换排序法)(简单易懂) 摘要:解题思路: 交换法排序是将每一位数与它之后的所有数字对比,如果发现比它小的数字,那么立即交换这两个数字的位置,连续向后对比直至最后一个数;然后再使用第二个数同样依次向后对比,直到排序完成。交换法排序和…… 题解列表 2023年12月17日 0 点赞 2 评论 940 浏览 评分:9.3
题解 2924: 明明的随机数(超详细) 摘要:```c #include #define MAX 1000 int main() { int N; int nums[MAX + 1] = {0}; // 初始…… 题解列表 2023年12月17日 0 点赞 0 评论 402 浏览 评分:9.9
2833: 金币(简单易懂) 摘要:```c #include #include int main() { int n; int sum = 0; scanf("%d", &n); int num; int …… 题解列表 2023年12月16日 0 点赞 0 评论 408 浏览 评分:9.9
1038: [编程入门]宏定义练习之三角形面积 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double a,b,c; cin >> a>…… 题解列表 2023年12月16日 0 点赞 0 评论 307 浏览 评分:0.0