梅花香自苦寒来

happy coding

  • 博客(255)
  • 资源 (24)
  • 收藏
  • 关注

原创 除了做分页,Mybatis插件机制还能这么玩

【代码】除了做分页,Mybatis插件机制还能这么玩。

2022-03-13 21:14:57 1289

原创 通用化递归建树与裁剪树

通用化递归建树与裁剪树

2022-03-13 08:20:03 1001

原创 【LeetCode 0069】【二分查找】求平方根

Given a non-negative integer , return the square root of rounded down to the nearest integer. The returned integer should be non-negative as well.You must not use any built-in exponent function or operator.Example 1:Example 2:Constraints:

2024-07-17 23:43:01 183

原创 【LeetCode 0051】【剪枝】N皇后

The n-queens puzzle is the problem of placing queens on an chessboard such that no two queens attack each other.Given an integer , return all distinct solutions to the n-queens puzzle. You may return the answer in any order.Each solution contains a disti

2024-07-15 23:53:32 460

原创 【LeetCode 0022】【DSF】生成括号

Givenn。

2024-07-14 18:22:22 129

原创 【LeetCode 0111】【递归/分治】二叉树的最小深度

0, 10^5]

2024-07-13 14:21:45 283 2

原创 【LeetCode 0104】【递归/分治】二叉树的最大深度

Given the of a binary tree, return its maximum depth.A binary tree’s maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Example 1:Example 2:Constraints:

2024-07-13 14:16:52 337 2

原创 【LeetCode 0102】【BSF/DSF】二叉树的层级遍历

Given the of a binary tree, return the level order traversal of its nodes’ values. (i.e., from left to right, level by level).Example 1:Example 2:Example 3:Constraints:

2024-07-12 23:47:56 208 1

原创 【LeetCode 0122】【DSF/DP/Greedy】买卖股票的最佳时机2

You are given an integer array where is the price of a given stock on the day.On each day, you may decide to buy and/or sell the stock. You can only hold at most one share of the stock at any time. However, you can buy it then immediately sell it on the

2024-07-11 23:06:54 277

原创 【LeetCode 0169】【摩尔投票算法】主元素

Given an array of size , return the majority element.The majority element is the element that appears more than times. You may assume that the majority element always exists in the array.Example 1:Example 2:Constraints:Follow-up: Could you solve the pr

2024-07-11 22:44:33 627

原创 【LeetCode 0236】【递归】求二叉树的最近公共祖先

qpq。

2024-07-10 23:42:43 583

原创 【LeetCode 0235】【递归】求二叉查找树的最近公共祖先

qpq。

2024-07-10 23:27:27 537

原创 【LeetCode 0050】【分治/递归】求x的n次方

Implement pow(x, n), which calculates raised to the power (i.e., ).Example 1:Example 2:Example 3:Constraints:

2024-07-09 23:58:16 323

原创 【LeetCode 0088】 【数组/双指针】合并两个有序数组

You are given two integer arrays and , sorted in non-decreasing order, and two integers and , representing the number of elements in and respectively.Merge and into a single array sorted in non-decreasing order.The final sorted array should not be re

2024-07-09 23:43:09 222

原创 【LeetCode 0070】【递归/动态规划】爬楼梯

n1or2。

2024-07-08 23:28:42 191

原创 【LeetCode 0098】【BST】验证有效的二叉查找树

Given the of a binary tree, determine if it is a valid binary search tree (BST).A valid BST is defined as follows:Example 1:Example 2:Constraints:

2024-07-08 09:30:00 399

原创 【LeetCode 0239】【大堆/双端队列】滑动窗口中的最大值

You are given an array of integers , there is a sliding window of size which is moving from the very left of the array to the very right. You can only see the numbers in the window. Each time the sliding window moves right by one position.Return the max

2024-07-07 18:10:24 184

原创 【LeetCode 0141】【链表】【双指针之快慢指针】判断给定单链表是否存在环

Given , the head of a linked list, determine if the linked list has a cycle in it.There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the pointer. Internally, is used to denote the index

2024-07-07 13:51:29 593

原创 【LeetCode 0024】【链表】交换单链表相邻两个节点

0, 100]

2024-07-07 13:39:15 389

原创 【LeetCode 0206】【链表】反转单链表

Given the of a singly linked list, reverse the list, and return the reversed list.Example 1:Example 2:Example 3:Constraints:Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both?

2024-07-06 17:24:12 213

原创 【LeetCode 0242】【Map/排序】有效的异位词

Given two strings and , return if is an anagram of , and otherwise.An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.Example 1:Example 2:Constraints:F

2024-07-05 23:23:19 165

原创 【LeetCode 0146】【设计】【双向循环链表】实现LRU缓存

Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.Implement the class:The functions and must each run in average time complexity.Example 1:Constraints:

2024-07-04 20:31:48 417

原创 【LeetCode 0703】【设计】【优先队列】返回数据流中第K大的元素

Design a class to find the largest element in a stream. Note that it is the largest element in the sorted order, not the distinct element.Implement class:Example 1:Constraints:

2024-07-03 23:56:38 183

原创 【LeetCode 0232】【设计】用FILO栈实现FIFO队列

Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (, , , and ).Implement the class:* Pushes element x to the back of the queue.* Removes the element from the front

2024-07-03 20:53:59 555

原创 【LeetCode 0225】【设计】用FIFO队列实现FILO栈

Implement a last-in-first-out (LIFO) stack using only two queues. The implemented stack should support all the functions of a normal stack (, , , and ).Implement the class:Notes:Example 1:Constraints:Follow-up: Can you implement the stack using only one

2024-07-02 23:22:20 733

原创 【LeetCode 0020】【栈】有效的括号

Given a string containing just the characters , , , , and , determine if the input string is valid.An input string is valid if:Example 1:Example 2:Example 3:Constraints:* * consists of parentheses only .

2024-07-01 23:59:53 248

原创 【网友问答】邻接矩阵的BSF/DSF遍历问题

网友提问解答

2024-05-31 20:59:22 117

原创 【Go基础】快速入门

用20%的时间学习常用80%的语法。

2024-05-31 20:41:24 572

原创 【Daily Pratice】【数组】之子数组问题--题解(7)

【代码】【Daily Pratice】【数组】之子数组问题--题解(7)

2024-03-19 23:48:20 307

原创 【Daily Pratice】【数组】之子数组问题--题解(4-6)

【代码】【Daily Pratice】【数组】之子数组问题--题解(4-5)

2024-03-18 23:20:12 791

原创 【Daily Pratice】【数组】之子数组问题--题解(1-3)

Split an array into two equal Sum subarrays(脸书面试题)

2024-03-17 21:35:36 403

原创 【佛祖保佑】永不宕机 ! 永无BUG !

【代码】【佛祖保佑】永不宕机!永无BUG!

2023-12-06 20:25:04 54

原创 【JSD1209考试】题目与解答

编写一个TCP服务程序,在5000号端口监听提供“字符反转”服务,即接收到客户端的一行数据后,将该行数据反转(例如123456变成654321)返回给客户端,如果收到“EndLine”,就结束与客户端的连接,如果客户端主动断开连接也同样处理。用SWING包编写一段代码重复地在屏幕上的随机位置用随机颜色画随机尺寸的圆形和矩形(形状也是随机出现),并在图形中间写一段文字(20分)(4)写SQL语句得到如下查询结果(所有人的成绩和年龄,即使这个人没有成绩也要显示成绩栏为空):(4分)数列1,1,2,3,5,…

2023-12-05 23:08:47 90

原创 【LeetCode 0151】【字符串】反转字符串中的单词

【代码】【LeetCode 0151】【字符串】反转字符串中的单词。

2023-12-04 21:30:39 221

原创 【LeetCode 0028】【字符串】实现strStr

【代码】【LeetCode 0028】【字符串】实现strStr。

2023-12-03 23:54:49 94

原创 【奇淫技巧】两数交换

前提:待交换的两个元素,分别用a,b表示,并且它们都是整数类型。

2023-12-02 12:16:10 68

原创 【LeetCode 0125】【双指针】有效回文

【代码】【LeetCode 0125】【双指针】有效回文。

2023-12-02 09:00:00 108

原创 【LeetCode 0170】【哈希】两数之和(3) 数据结构设计

【代码】【LeetCode 0167】【数组】两数之和(3) 数据结构设计。

2023-12-01 09:15:00 120

原创 【LeetCode 0167】【数组】两数之和(2)

【代码】【LeetCode 0167】【数组】两数之和(2)

2023-11-30 23:53:59 110

原创 【LeetCode 0001】【数组】两数之和

Given an array of integers and an integer , return indices of the two numbers such that they add up to .You may assume that each input would have exactly one solution, and you may not use the same element twice.You can return the answer in any order.Examp

2023-11-29 23:45:51 372

springMVC+mybatis+maven+junit

springMVC,mybatis,maven,junit

2015-05-15

逆波兰式表达式计算引擎

逆波兰式表达式计算引擎 ReversePolishExpression Tool V1.0.1 Feature 1.Attention! the input expression isn't allowed to constants Invalid Characters like '_、#' 2.It's supported the calculation of div(/) mod(%) sqrt(_) mul(*) sub(-) pow(^) 3.The Usage: there is needly two HashMap<String,Object> .One as the input paramters and another was put into the first HashMap for passing the expression's values.The parent HashMap contains lots of placeholders, just like the 'AA'、'BB'、'CC' see the example code below. eg. HashMap<String,Object> maps = new HashMap<String,Object>(); HashMap<String,Object> kvmap = new HashMap<String,Object>(); maps.put("expression", "(((AA*-BB)*CC+(AA*-BB)/CC)+((AA*(-BB))*CC+(AA*-BB)%CC))"); kvmap.put("AA", 4); kvmap.put("BB", 2); kvmap.put("CC", 9); maps.put("kvmap", kvmap); System.out.println("使用工具结果:"+ReversePolishExpression.calculateExpression(maps));

2014-11-10

JavaWebServiceClient.zip(客户端)

JavaWebServiceClient.zip(客户端)

2013-03-04

JavaWebServiceApp.zip(服务器)

JavaWebServiceApp.zip

2013-03-04

java版远程控制的实例demo

java版远程控制的源代码,仅供学习!

2013-01-26

简易文本编辑器

自己写的一个文本编辑器,支持多语言,多风格,简洁漂亮,经过CHROME,FIREFOX,IE等测试。

2012-03-03

<算法分析与设计>试卷

算法试卷算法试卷算法试卷算法试卷算法试卷算法试卷算法试卷算法试卷算法试卷

2011-01-14

计算机体系结构答案(清华大学出版社).

计算机体系结构答案(清华大学出版社)(中英答案都有)

2010-10-27

《计算机英语》全书翻译及课后答案_【khdaw_lxywyl】.pdf

《计算机英语》全书翻译及课后答案_【khdaw_lxywyl】.pdf

2010-10-22

j2me手机浏览器/j2me手机浏览器

j2me手机浏览器 j2me手机浏览器 j2me手机浏览器

2010-07-11

用J2SE实现原网页浏览器(java)

用J2SE实现原网页浏览器 用J2SE实现原网页浏览器 用J2SE实现原网页浏览器

2010-07-11

2010下半学期广工大数据库总复习资料

2010下半学期广工大数据库总复习资料 2010下半学期广工大数据库总复习资料

2010-06-29

飞鸽传书2007绿色版下载.zip

飞鸽传书2007绿色版下载.zip 飞鸽传书2007绿色版下载.zip 飞鸽传书2007绿色版下载.zip

2010-06-17

企业员工管理系统(Java技术).rar

企业员工管理系统(Java技术).rar

2010-06-17

操作系统复习试题汇总及答案

操作系统复习试题汇总及答案2009、2010年 操作系统复习试题汇总及答案 操作系统复习试题汇总及答案 操作系统复习试题汇总及答案

2010-06-12

操作系统试题与答案-操作系统试题与答案

操作系统试题与答案 操作系统试题与答案 操作系统试题与答案

2010-06-12

新闻管理系统——jsp版

新闻管理系统——jsp版 用java实现 新闻管理系统

2010-04-14

C语言 课程设计 五子棋

C语言 课程设计 五子棋,C语言 课程设计 五子棋,C语言 课程设计 五子棋,C语言 课程设计 五子棋

2010-04-14

C语言课程设计代码——一字棋小游戏

C语言课程设计代码——一字棋小游戏,C语言课程设计代码——一字棋小游戏C语言课程设计代码——一字棋小游戏,C语言课程设计代码——一字棋小游戏

2010-04-14

空空如也

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

TA关注的人

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