输入两个链表,找出它们的第一个公共节点。 如下面的两个链表: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), n ...
分类:
其他好文 时间:
2021-03-16 13:39:17
阅读次数:
0
# 1.可迭代对象# 能被for循环遍历取值的数据类型:list/str/tuple/dict/set# 遍历(迭代):可迭代对象使用for.. in..的循环语法从其中依次拿到数据使用的过程 # for i in 可迭代对象:# li = [1, 2, 3]# for i in li: # 遍历取 ...
分类:
其他好文 时间:
2021-03-16 12:00:59
阅读次数:
0
void flatten(TreeNode root) { // base case,即最小 if (root == null) return; flatten(root.left); flatten(root.right); /**** 后序遍历 ****/ // 1、保存原来的左右节点,避免变换 ...
分类:
其他好文 时间:
2021-03-16 11:50:33
阅读次数:
0
1.实验任务11.行方向 #include<stdio.h> int main(){ printf(" o o\n"); printf("<H> <H>\n"); printf(" I I I I\n"); return 0; } 2.列方向 #include<stdio.h> int main() ...
分类:
编程语言 时间:
2021-03-15 11:30:29
阅读次数:
0
//打印一个字符小人 #include <stdio.h> int main() { printf(" o\n"); printf("<H>\n"); printf("I I\n"); printf(" o\n"); printf("<H>\n"); printf("I I\n"); return ...
分类:
编程语言 时间:
2021-03-15 11:13:42
阅读次数:
0
Description: Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by lev ...
分类:
其他好文 时间:
2021-03-15 11:13:18
阅读次数:
0
#include <fstream> #include <strstream> using namespace std; int main(int argc,char*argv[]) { strstream textfile; ifstream in(argv[1]); textfile << in ...
分类:
编程语言 时间:
2021-03-15 11:07:17
阅读次数:
0
题目 求 aa 的 bb 次方对 pp 取模的值。 输入格式 三个整数 a,b,pa,b,p ,在同一行用空格隔开。 输出格式 输出一个整数,表示a^b mod p的值。 数据范围 0≤a,b≤1090≤a,b≤109 1≤p≤1091≤p≤109 输入样例: 3 2 7 输出样例: 2 #incl ...
Check If a String Contains All Binary Codes of Size K (M) 题目 Given a binary string s and an integer k. Return True if every binary code of length k is ...
分类:
其他好文 时间:
2021-03-15 10:41:54
阅读次数:
0
1.分页查询 ①配置类中追加分页插件 //注册分页插件 @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); } ②测试分页查询 //测试分页查询 @Test ...
分类:
其他好文 时间:
2021-03-10 13:13:53
阅读次数:
0