连击 天
fork: star:
原文:https://www.journaldev.com/787/java-sort-list 有时我们必须在Java中对列表进行排序,然后再处理其元素。在本教程中,我们将学习如何对列表进行排序。我们还将学习如何使用我们自己的...
https://leetcode-cn.com/problems/container-with-most-water/ 思路:两层遍历 public int maxArea(int[] height) { int maxArea = 0; for (int i = 0; i < height.length - 1; i++) { for ...
https://leetcode-cn.com/problems/regular-expression-matching/ 思路:动态规划 这是一个通配符问题 .表示任意字符,*表示0个或多个字符,.*表示任何字符串除null外 理解.*匹配ab, .*可以...
https://leetcode-cn.com/problems/palindrome-number/ 思路1:转换为字符串,遍历一半字符串 思路2:不转换为字符串,按下面这个思路并排除一些特殊情况 public boolean isPalindrome(int ...
https://leetcode-cn.com/problems/string-to-integer-atoi/ 思路:把示例中的几种情况考虑到就可以了 public int myAtoi(String str) { if (str == null) { return 0; } // 忽略首尾空格 .....
https://leetcode-cn.com/problems/reverse-integer/ 思路:注意正负数、边界 public int reverse(int x) { if (x == 0 || x == -2147483648) { return 0; } Queue<Integer> queue = new Lin...
https://leetcode-cn.com/problems/zigzag-conversion/ 思路:重点是找interval和step的公式 public String convert(String s, int numRows) { if (s == null) { return ""; } int len = s.l...
https://leetcode-cn.com/problems/longest-palindromic-substring/ 思路:动态规划 public String longestPalindrome(String s) { // 注意:判断输入范围 if (s == null || s.length() == 0...
https://leetcode-cn.com/problems/median-of-two-sorted-arrays/ 理解中位数: https://baike.baidu.com/item/%E4%B8%AD%E4%BD%8D%E6%95%B0/3087401?fr=aladdin 思路: public double find...
https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ 思路1:构造一个map来保存每个字符最近一次出现的索引,并随时计算子串长度 思路2:滑动窗口 public i...
https://leetcode-cn.com/problems/add-two-numbers/ 思路:考虑下面几种情况 1、考虑最高位进位 2、考虑l1和l2长度不一样 3、考虑l1、l2为空 public ListNode addTwoNumbers(ListNode l1, L...
一直在开始,一直在放弃,再开始一次;从第1题开始,不求1天1题只求坚持下去,不追求性能最优只求有思路能通过。 https://leetcode-cn.com/problems/two-sum/ 思路:两个循环 public int[] t...
一、介绍 主要通过下面这两个教程来入门,一个是文档第二个是视频(虽然是收费的但是会搜索的话还是能找到免费的) Vue2.x教程 https://cn.vuejs.org/v2/guide/index.html Vue2.5开发去哪儿网A...
git比较与回退小结 比较 比较双方 命令 工作区 vs 暂存区 git diff [file] 工作区 vs 版本库 git diff 版本号 [file] 暂存区 vs 版本库 git diff --cached 版本号 [file] 版本库 vs 版本库 ...
MySQL存储过程 存储过程 定义存储过程 delimiter ;; create procedure get_user_count() begin select count(*) as user_count from sys_user; end;; delimiter; 关于分隔符 MySQL语句分隔符...
需要在MySQL中保存Java对象。 说明: 对象必须实现序列化 MySQL中对应字段设置为blob 将Java对象序列化为byte[] public static byte[] obj2byte(Object obj) throws Exception { byte[] ret ...
Question 929. Unique Email Address Solution 题目大意: 给你一个邮箱地址的数组,求出有多少个不同的地址,其中localName有如下规则 加号(+)后面的字符及加号忽略 点(.)也忽略 思路: 直接...
Algorithm 923. 3Sum With Multiplicity - LeetCode Review Building a network attached storage device with a Raspberry Pi 搭建家用储存系统,使用树莓派和移动硬盘,搭建一个 NAS,操作...
实现短信验证码登录 前面实现了 用户名+密码 的登录方式,现在实现一下短信验证码登录. 开发短信验证码接口 短信验证码和图形验证码类似,用户从手机短信得到验证码和从图片得到验证码类似. 校...
没有更多内容
加载失败,请刷新页面
文章删除后无法恢复,确定删除此文章吗?
动弹删除后,数据将无法恢复
评论删除后,数据将无法恢复