1、打印如下的三角形(可以根据输入的值确定行数,和最长的那一行有几个符号): ***** **** *** ** * import java.util.Scanner; public class TrianglePrint { public static void main(String[] arg ...
分类:
编程语言 时间:
2021-04-12 12:20:50
阅读次数:
0
01、什么是数组 数组是相同数据类型的有序集合 数组的描述是相同类型的若干个数据,按照一定的先后次序排列组合而成 其中,每一个数据称作一个数据元素,每个数组元素可以通过一个下标来访问 02、数组的声明和创建 首先必须声明数组变量,才能在数组中使用数组,数组语法: detaType[] arrayRe ...
分类:
编程语言 时间:
2021-04-12 12:19:15
阅读次数:
0
/** * Definition for singly-linked list. * type ListNode struct { * Val int * Next *ListNode * } */ func rotateRight(head *ListNode, k int) *ListNode ...
分类:
其他好文 时间:
2021-04-12 11:49:58
阅读次数:
0
题目: 输入两个链表,找出它们的第一个公共节点。 如下面的两个链表: 在节点 c1 开始相交。 示例 1: 输入:intersectVal = 8, listA = [4,1,8,4,5], listB = [5,0,1,8,4,5], skipA = 2, skipB = 3 输出:Referen ...
分类:
其他好文 时间:
2021-04-12 11:43:41
阅读次数:
0
#include<iostream> #include<algorithm>//sort头文件 using namespace std; struct student{ int theta;//阈值 int result;//结果 }; bool compare(student a,student ...
分类:
编程语言 时间:
2021-04-12 11:39:49
阅读次数:
0
现象: 执行 lsnrctl start 来启动 listener,却失败了。 $ lsnrctl stat LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 09-APR-2021 23:45:02 Copyright (c) 1991, ...
分类:
数据库 时间:
2021-04-10 13:32:17
阅读次数:
0
#include <bits/stdc++.h> using namespace std; template<class ElemType> struct BiNode { ElemType data; BiNode<ElemType> *lchild, *rchild; int disToLeft ...
分类:
其他好文 时间:
2021-04-10 13:18:26
阅读次数:
0
直接遍历链表,使用set做标记位(标记是否已经到达过) /** * Definition for singly-linked list. * type ListNode struct { * Val int * Next *ListNode * } */ type void struct{} fun ...
分类:
其他好文 时间:
2021-04-10 12:49:23
阅读次数:
0
3.1.封装 1、什么是封装: 将函数定义到结构体内部,就是封装。 2、什么是类: 带有函数的结构体,称为类。 3、什么是成员函数: 结构体里面的函数,称为成员函数。 #include<stdio.h> #include<stdlib.h> #include<windows.h> struct St ...
分类:
编程语言 时间:
2021-04-10 12:48:58
阅读次数:
0
这几天转去尝试做leetcode,意外发现其实leetcode题做做还是挺有收获的,不过感觉OJ做起来收获更大些,这两个还是结合起来做好点。 这道题思路还是比较清晰的,利用bellman ford的思路,不过因为图可能不连通,所以参考kuangbin大佬的思路加了一个“超级源”(因为此题只需要判断负 ...
分类:
其他好文 时间:
2021-04-09 13:20:46
阅读次数:
0