![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
「已注销」
这个作者很懒,什么都没留下…
展开
-
正则表达式匹配
题目如力扣剑指offer19 这道题的核心思路是判断模式串第二位是否是*,采用递归算法非常的好用 class Solution { public boolean isMatch(String s, String p) { if (s == null || p == null) return false; int strindex = 0; int patindex = 0; return matching(s, strindex, p, patindex); }原创 2021-06-27 20:08:53 · 99 阅读 · 0 评论 -
剑指offer 16.数值的整数次方(java)
实现pow(x,n),即计算 x 的 n 次幂函数(即,xn)。不得使用库函数,同时不需要考虑大数问题。 示例 1: 输入:x = 2.00000, n = 10 输出:1024.00000 示例 2: 输入:x = 2.10000, n = 3 输出:9.26100 示例 3: 输入:x = 2.00000, n = -2 输出:0.25000 解释:2-2 = 1/22 = 1/4 = 0.25 提示: -100.0 <x< 100.0 -231<= n &...原创 2021-06-26 14:58:51 · 47 阅读 · 0 评论