自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 资源 (2)
  • 收藏
  • 关注

原创 数据结构-时间、空间复杂度

2020/9/17时间复杂度时间复杂度指算法中基本运算的频度,即某条语句在算法中被重复执行的次数。例如:i=i*2表示2的 i 次方小于等于n方法:找出主体语句(即while或for语句)中与T(n)成正比的循环变量,得到执行次数t,小于等于n递归程序:T(n)=1+T(n-1)=n-1+T(1),T(n)=O(n)斐波那契数列递归:一个函数内部调用这个函数自身public class Solution { public int Fibonacci(int n) {

2020-09-17 15:07:09 118

原创 1013 Battle Over Cities java

2020/9/1问题It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need to repair any other highways to keep the r

2020-09-01 22:31:19 141

原创 夏令营:天津大学计算机与智能学院、山东大学软院、华东师范大学软院

今年想有学上真难,特别是对于我这种边缘人来说,哭泣哎,只能当做增长面试经验,查漏补缺吧天大1000+人选出300+人入营,优营名额不到1/2。面试:4分钟PPT(重点介绍一个科研)+1分钟自我介绍(英语),针对PPT提问。基本上六七分钟过一个人。山大600+人选出150左右入营面试:数据结构+概率论。1.一个天平,十个大小相同质量不同的砝码从大到小排序,问最少操作几次2.三个盒子有一个装有珍珠,现拿到了一个盒子,没有装珍珠,问再去取一个盒子里面装珍珠的概率华师大1000左右人选出60左

2020-07-18 12:54:19 1401

原创 PAT1010甲级 java

2020/7/12问题Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integers N​1​​ and N​2​​, your task is to find t

2020-07-13 08:05:31 181 1

原创 PAT1007 甲级 java

2020/7/6问题Given a sequence of K integers { N​1​​, N​2​​, …, N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i+1​​, …, N​j​​ } where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has the largest sum of its elements. Fo

2020-07-07 22:45:35 132

原创 PAT1004甲级 java

2020/7/5问题A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one test case. Each case starts with a line containing 0<N<100, the num

2020-07-05 21:42:30 231

原创 PAT1003甲级 java

2020/7/2-2020/7/4问题As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the length of each road between any pair

2020-07-04 00:34:02 195

原创 PAT1002甲级 java

2020/7/1问题This time, you are supposed to find A+B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial:K N​1​​ a​N​1​​​​ N​2​​

2020-07-01 22:08:00 170

原创 PAT甲级1001 java

2020/7/1问题Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input file contains one test case. Each case contains

2020-07-01 20:42:30 108

原创 PAT 1004 (java)

2020/6/30问题读入 n(>0)名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。输入格式:每个测试输入包含 1 个测试用例,格式为第 1 行:正整数 n第 2 行:第 1 个学生的姓名 学号 成绩第 3 行:第 2 个学生的姓名 学号 成绩 ... ... ...第 n+1 行:第 n 个学生的姓名 学号 成绩其中姓名和学号均为不超过 10 个字符的字符串,成绩为 0 到 100 之间的一个整数,这里保证在一组测试用例中没有两个学生的成绩是相同的。输

2020-06-30 20:40:46 281

原创 PAT1003 (java)

2020/6/30问题“答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于 PAT 的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正确”,否则输出“答案错误”。得到“答案正确”的条件是:字符串中必须仅有 P、 A、 T这三种字符,不可以包含其它字符;任意形如 xPATx 的字符串都可以获得“答案正确”,其中 x 或者是空字符串,或者是仅由字母 A 组成的字符串;如果 aPbTc 是正确的,那么 aPbATca 也是正确的,其中 a、 b、 c 均或者是空字符串,

2020-06-30 19:49:23 225

原创 PAT乙级 1002 (java)

2020/6/30问题读入一个正整数 n,计算其各位数字之和,用汉语拼音写出和的每一位数字。输入格式:每个测试输入包含 1 个测试用例,即给出自然数 n 的值。这里保证 n 小于 10​100​​。输出格式:在一行内输出 n 的各位数字之和的每一位,拼音数字间有 1 空格,但一行中最后一个拼音数字后没有空格。遇到的错误1. int cannot be dereferenced2. 数组[i]直接和数字进行比较,编译错误解决1. int型没有split方法,String型拥有split

2020-06-30 13:08:44 238

东北大学数据结构历年试题

东北大学数据结构试题,虽然是2013年的试题,但是2017年仍然有重复的题目

2019-03-27

Java目录树控件

java 实现系统目录树结构,显示文件夹下的文件。树结构

2019-01-11

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除