自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

红鲤鱼与绿鲤鱼与驴

Coding the world, coding the future!

  • 博客(274)
  • 收藏
  • 关注

原创 手撕链表算法题型,干这篇就完了…

算法面试链表题型总结

2022-02-08 15:18:15 301

原创 Spring AOP的这些知识点,你都搞懂了嘛?

Spring AOP的这些知识点,你都搞懂了吗

2022-01-11 10:10:38 195

原创 肝了几个月,终于把Spring Bean的生命周期流程理清楚了…

啃了几个月Spring源码,终于有些头绪了…

2022-01-05 13:14:38 322

原创 聊一聊Java中的类加载~

聊一聊Java中的类加载机制~

2021-12-03 21:44:22 227

原创 聊一聊Java反射

聊一聊Java反射,顺便斗一斗表情包……????

2021-11-24 21:47:30 565

转载 IDEA编辑器tomcat启动server乱码,TomcatLocalhostLog乱码,TomcatcatalinaLog乱码以及页面乱码问题

转载地址:https://blog.csdn.net/MTner/article/details/87084404一:首先server乱码问题的解决:症状:解决方法:找到tomcat安装目录找到conf文件夹下的该文件更改编码为UTF-8二:TomcatLocahostLog日志及TomcatCataniaLog日志乱码,tomcat启动后静态网页乱码问题的解决第一步:...

2019-11-06 19:42:35 242

原创 telnet 命令演示 以及 Dubbo常见错误解决方法

一、telnet命令dubbo服务发布之后,我们可以利用telnet命令进行调试、管理。1、预备工作代码:Dubbo入门Demohttps://github.com/MiaoPlus/dubbodemo.gita、启动 zookeeper 注册中心双击 zookeeper/bin 目录下的 zkServer.cmdb、启动服务提供者2、连接服务打开...

2019-10-14 14:32:11 1614

原创 Dubbo常用基础命令

参考文章:Dubbo官方文档http://dubbo.apache.org/zh-cn/index.htmlDubbo 入门 demo:https://github.com/MiaoPlus/dubbodemo.git1、dubbo:service服务提供者暴露服务配置。对应的配置类:org.apache.dubbo.config.ServiceConfig属性 类型 ...

2019-10-14 09:21:49 993

原创 Dubbo入门练习demo(IDEA版)

Dubbo是阿里巴巴开源的基于 Java 的高性能 RPC 分布式服务框架,现已成为 Apache 基金会孵化项目。因为是阿里开源项目,国内很多互联网公司都在用,已经经过很多线上考验。内部使用了 Netty、Zookeeper,保证了高性能高可用性。使用 Dubbo 可以将核心业务抽取出来,作为独立的服务,逐渐形成稳定的服务中心,可用于提高业务复用灵活扩展,使前端应用能更快速的响应多变的市...

2019-10-07 18:23:57 475

原创 剑指offer 15:反转链表

题目描述输入一个链表,反转链表后,输出新链表的表头。法一:迭代法/*public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; }}*/public class Solution { public L...

2019-04-21 18:35:02 221

原创 剑指offer 14:链表中倒数第k个节点

题目描述输入一个链表,输出该链表中倒数第k个结点。/*public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; }}*/public class Solution { public ListNode F...

2019-04-21 18:02:40 164

原创 剑指offer 13:调整数组顺序使奇数位于偶数前面

题目描述输入一个整数数组,实现一个函数来调整该数组中数字的顺序,使得所有的奇数位于数组的前半部分,所有的偶数位于数组的后半部分,并保证奇数和奇数,偶数和偶数之间的相对位置不变。法一:public class Solution { public void reOrderArray(int [] array) { int oddCnt=0; for...

2019-04-21 17:06:41 188

原创 剑指offer 12:数值的整数次方

题目描述给定一个double类型的浮点数base和int类型的整数exponent。求base的exponent次方。public class Solution { public double Power(double base, int exponent) { boolean isNegtive = false; if(exponent == 0...

2019-04-19 14:24:45 213

原创 剑指offer 11:二进制中 1 的个数

题目描述输入一个整数,输出该数二进制表示中1的个数。其中负数用补码表示。解题代码法一:public class Solution { public int NumberOf1(int n) { int cnt = 0; while(n != 0){ n &= (n - 1); cnt+...

2019-04-19 14:06:37 180

原创 剑指offer 10:矩形覆盖

题目描述我们可以用2*1的小矩形横着或者竖着去覆盖更大的矩形。请问用n个2*1的小矩形无重叠地覆盖一个2*n的大矩形,总共有多少种方法?public class Solution { public int RectCover(int n) { int x = 1, y = 2; if(n <= 2) return n; for...

2019-04-18 16:12:03 193

原创 剑指offer 09:变态跳台阶

题目描述一只青蛙一次可以跳上1级台阶,也可以跳上2级……它也可以跳上n级。求该青蛙跳上一个n级的台阶总共有多少种跳法。/*f(n-1) = f(n-2) + f(n-3) + ... + f(0)f(n) = f(n-1) + f(n-2) + ... + f(0)f(n) - f(n-1) = f(n-1)f(n) = 2*f(n-1)*/public class Solu...

2019-04-18 16:04:48 162

原创 剑指offer 08:跳台阶

题目描述一只青蛙一次可以跳上1级台阶,也可以跳上2级。求该青蛙跳上一个n级的台阶总共有多少种跳法(先后次序不同算不同的结果)。public class Solution { public int JumpFloor(int n) { if(n<=2) return n; int pre2=1,pre1=2,result=1; ...

2019-04-18 15:59:13 177

原创 剑指offer 07:斐波那契数列

题目描述大家都知道斐波那契数列,现在要求输入一个整数n,请你输出斐波那契数列的第n项(从0开始,第0项为0)。(n<=39)法一:public class Solution { public int Fibonacci(int n) { int[] fib = new int[40]; fib[0] = 0; fib[1]...

2019-04-18 11:26:13 236

原创 剑指offer 06:旋转数组的最小数字

题目描述把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。 输入一个非减排序的数组的一个旋转,输出旋转数组的最小元素。 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,该数组的最小值为1。 NOTE:给出的所有元素都大于0,若数组大小为0,请返回0。解题代码二分写法两种形式:1、缩小范围时,right = mid, left = mid + 1, ...

2019-04-18 11:04:43 152

原创 剑指offer 04:重构二叉树

题目描述输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7,2,1,5,3,8,6},则重建二叉树并返回。/** * Definition for binary tree * public class TreeNode { * int v...

2019-04-17 18:10:44 187

原创 剑指offer 03:从尾到头打印链表

题目描述输入一个链表,按链表值从尾到头的顺序返回一个ArrayList。递归法/*** public class ListNode {* int val;* ListNode next = null;** ListNode(int val) {* this.val = val;* }*...

2019-04-17 16:35:34 151

原创 剑指offer 05:用两个栈实现队列

题目描述用两个栈来实现一个队列,完成队列的Push和Pop操作。 队列中的元素为int类型。解题代码import java.util.Stack;public class Solution{ Stack<Integer> in = new Stack<>(); Stack<Integer> out = new Stack<...

2019-04-15 13:12:58 134

原创 剑指offer 02:替换空格

题目描述请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy。解题代码public class Solution{ public String replaceSpace(StringBuffer str){ int p1 = str.length() - 1...

2019-04-15 10:13:41 202

原创 剑指offer 01:二维数组中的查找

题目描述在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。解题代码public class Solution{ public boolean Find(int target, int [][] array){ if...

2019-04-14 21:21:20 146

原创 Codeforces Round #514 (Div. 2).B. Forgery

B. Forgerytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputStudent Andrey has been skipping physical education lessons for the wh...

2018-10-06 00:45:46 349

原创 Codeforces Round #514 (Div. 2).A. Cashier

A. Cashiertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has recently got a job as a cashier at a local store. His day at...

2018-10-06 00:43:33 225

原创 Codeforces Round #513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2).B. Maximum Sum of Digits

B. Maximum Sum of Digitstime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given a positive integer nn.Let S(x)S(x) be su...

2018-10-04 19:55:58 288

原创 Codeforces Round #513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2).A. Phone Numbers

A. Phone Numberstime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputLet's call a string a phone number if it has length 11 and fits ...

2018-10-04 18:06:21 435

原创 HDU.5533 Dancing Stars on Me(思维+数学)

问题 G: Dancing Stars on Me时间限制: 1 Sec  内存限制: 128 MB提交: 95  解决: 49[提交] [状态] [讨论版] [命题人:admin]题目描述The sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful ni...

2018-10-02 15:52:09 243

原创 HDU-5538 House Building(思维)

问题 L: House Building时间限制: 1 Sec  内存限制: 128 MB提交: 66  解决: 49[提交] [状态] [讨论版] [命题人:admin]题目描述Have you ever played the video game Minecraft? This game has been one of the world’s most popular game...

2018-10-02 14:20:35 309

原创 Hdu.5512 Pagodas(思维)

时间限制: 1 Sec  内存限制: 128 MB提交: 55  解决: 36[提交] [状态] [讨论版] [命题人:admin]题目描述n pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 1 to n. How...

2018-10-01 12:44:58 298

原创 HDOJ 5461 Largest Point(沈阳网络赛)(思维)

时间限制: 1 Sec  内存限制: 128 MB提交: 104  解决: 35[提交] [状态] [讨论版] [命题人:admin]题目描述Given the sequence A with n integers t1 , t2 , …… , tn . Given the integral coefficients a and b. The fact that select two ...

2018-09-30 14:13:40 208

原创 Codeforces Round #508 (Div. 2).C. Gambling(模拟+思维)

C. Gamblingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo players A and B have a list of nn integers each. They both want t...

2018-09-24 16:03:01 235

原创 Codeforces Round #512 (Div. 2, based on Technocup 2019 Elimination Round 1).C. Vasya and Golden Tick

C. Vasya and Golden Tickettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Vasya found a golden ticket — a sequence which...

2018-09-24 13:38:07 433

原创 Codeforces Round #512 (Div. 2, based on Technocup 2019 Elimination Round 1).B. Vasya and Cornfield

B. Vasya and Cornfieldtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya owns a cornfield which can be defined with two intege...

2018-09-24 13:35:50 426

原创 Technocup 2019 - Elimination Round 1.A. In Search of an Easy Problem

A. In Search of an Easy Problemtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen preparing a tournament, Codeforces coordinato...

2018-09-24 13:33:15 496

原创 Codeforces Round #511 (Div. 2).A. Little C Loves 3 I(水题)

A. Little C Loves 3 Itime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle C loves number «3» very much. He loves all things abo...

2018-09-22 11:20:58 404

原创 Codeforces Round #511 (Div. 2).B. Cover Points

B. Cover Pointstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn points on the plane, (x1,y1),(x2,y2),…,(xn,yn)(x1,y1)...

2018-09-22 11:18:50 418

原创 Educational Codeforces Round 51 (Rated for Div. 2).B. Relatively Prime Pairs(水题)

B. Relatively Prime Pairstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a set of all integers from ll to rr inclu...

2018-09-21 12:37:13 422

原创 Educational Codeforces Round 51 (Rated for Div. 2).A. Vasya And Password(模拟)

A. Vasya And Passwordtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya came up with a password to register for EatForces — a ...

2018-09-21 12:33:52 446

空空如也

空空如也

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

TA关注的人

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