随笔分类 -  力扣

摘要:#在IDEA上快乐刷力扣 为即将到来的秋招准备刷题,网上找了很多教程,整理一下,方便以后换电脑快速上手 ##一、安装力扣插件 在IDEA内部直接install即可 File-->settings-->plugins ##二、配置力扣插件 File-->settings-->tools $!veloc 阅读全文
posted @ 2021-05-19 17:16 阿狸狸爱吃饭 阅读(2052) 评论(0) 推荐(0)
摘要:写在前面,参考力扣官网的画解算法。。真的太清晰明了了 #一、java代码 /* * @lc app=leetcode.cn id=15 lang=java * * [15] 三数之和 */ // @lc code=start class Solution { public List<List<Int 阅读全文
posted @ 2020-09-01 17:26 阿狸狸爱吃饭 阅读(69) 评论(0) 推荐(0)
摘要:#一、java代码 /* * @lc app=leetcode.cn id=14 lang=java * * [14] 最长公共前缀 */ // @lc code=start class Solution { public String longestCommonPrefix(String[] st 阅读全文
posted @ 2020-09-01 16:01 阿狸狸爱吃饭 阅读(105) 评论(0) 推荐(0)
摘要:#一、java代码 /* * @lc app=leetcode.cn id=13 lang=java * * [13] 罗马数字转整数 */ // @lc code=start class Solution { public int romanToInt(String s) { int sum=0; 阅读全文
posted @ 2020-09-01 15:00 阿狸狸爱吃饭 阅读(97) 评论(0) 推荐(0)
摘要:写在前面,参考的是力扣官网的解答。 #一、java算法 /* * @lc app=leetcode.cn id=12 lang=java * * [12] 整数转罗马数字 */ // @lc code=start class Solution { public String intToRoman(i 阅读全文
posted @ 2020-09-01 11:29 阿狸狸爱吃饭 阅读(97) 评论(0) 推荐(0)
摘要:写在前面,参考的是力扣官网的图解 一、java算法 /* * @lc app=leetcode.cn id=11 lang=java * * [11] 盛最多水的容器 */ // @lc code=start class Solution { public int maxArea(int[] hei 阅读全文
posted @ 2020-08-09 19:25 阿狸狸爱吃饭 阅读(67) 评论(0) 推荐(0)
摘要:写在前面,太难了,目前还在思考,只是先把答案写出来,等后面想完了再补上思考过程 一、java代码 /* * @lc app=leetcode.cn id=10 lang=java * * [10] 正则表达式匹配 */ // @lc code=start class Solution { publi 阅读全文
posted @ 2020-08-09 18:36 阿狸狸爱吃饭 阅读(158) 评论(0) 推荐(0)
摘要:写在前面,参考的力扣官网的解题 一、java代码 /* * @lc app=leetcode.cn id=9 lang=java * * [9] 回文数 */ // @lc code=start class Solution { public boolean isPalindrome(int x) 阅读全文
posted @ 2020-08-07 12:08 阿狸狸爱吃饭 阅读(101) 评论(0) 推荐(1)
摘要:写在前面,参考的是力扣官网的解题思路,好懂和图解 一、java代码 /* * @lc app=leetcode.cn id=8 lang=java * * [8] 字符串转换整数 (atoi) */ // @lc code=start class Solution { public int myAt 阅读全文
posted @ 2020-08-07 11:54 阿狸狸爱吃饭 阅读(131) 评论(0) 推荐(0)
摘要:写在前面,参考的是力扣官网的画解算法 一、java代码 /* * @lc app=leetcode.cn id=7 lang=java * * [7] 整数反转 */ // @lc code=start class Solution { public int reverse(int x) { //定 阅读全文
posted @ 2020-08-06 16:39 阿狸狸爱吃饭 阅读(74) 评论(0) 推荐(0)
摘要:写在前面,参考的是力扣官网的画解算法 一、java代码 /* * @lc app=leetcode.cn id=6 lang=java * * [6] Z 字形变换 */ // @lc code=start class Solution { public String convert(String 阅读全文
posted @ 2020-08-06 12:08 阿狸狸爱吃饭 阅读(105) 评论(0) 推荐(0)
摘要:写在前面,参考的力扣官网的题解,动态规划 一、java代码 /* * @lc app=leetcode.cn id=5 lang=java * * [5] 最长回文子串 */ // @lc code=start class Solution { public String longestPalind 阅读全文
posted @ 2020-08-06 10:52 阿狸狸爱吃饭 阅读(89) 评论(0) 推荐(0)
摘要:写在前面,参考的力扣官网题解的解法三,自己用画图的形式解析了这个解法 二分 ##一、java代码 /* * @lc app=leetcode.cn id=4 lang=java * * [4] 寻找两个正序数组的中位数 */ // @lc code=start class Solution { pu 阅读全文
posted @ 2020-08-05 20:34 阿狸狸爱吃饭 阅读(181) 评论(0) 推荐(0)
摘要:写在前面,参考的力扣官网的画解算法 滑动窗口 class Solution { public int lengthOfLongestSubstring(String s) { //定义字符串长度,距离 int n=s.length(),ans=0; //用什么装start指针 //定义一个map数据 阅读全文
posted @ 2020-08-05 12:06 阿狸狸爱吃饭 阅读(50) 评论(0) 推荐(0)
摘要:写在前面,参考的力扣官网的画解算法 链表 /* * @lc app=leetcode.cn id=2 lang=java * * [2] 两数相加 */ // @lc code=start /** * Definition for singly-linked list. * public class 阅读全文
posted @ 2020-08-05 11:02 阿狸狸爱吃饭 阅读(41) 评论(0) 推荐(0)
摘要:写在前面,参考的力扣官网的画解算法 #hash映射 /* * @lc app=leetcode.cn id=1 lang=java * * [1] 两数之和 */ // @lc code=start class Solution { public int[] twoSum(int[] nums, i 阅读全文
posted @ 2020-08-05 10:59 阿狸狸爱吃饭 阅读(65) 评论(0) 推荐(0)