快慢指针法找链表中点


https://www.educoder.net/problems/35meyxwn4a9j/oj/9ntpk43e上面是题目原题:题目描述补充函数 fun。line 链表是一个有序链表,现请你找出此链表的中间节点,将此节点的值返回。如果链表节点数是偶数,则取中间靠左的节点的值。输入格式本题只需关注

dfs--acwing排列数字


#include <iostream>using namespace std;const int N = 10;bool st[N];int path[N];int n;void dfs(int u){ if(u == n){ for(int i = 0;i <

acwing每日一题-字符串删减


参考:https://www.acwing.com/solution/content/56819/#include <iostream>#include <algorithm>#include <string>using namespace std;int num