自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 资源 (1)
  • 收藏
  • 关注

原创 【LeetCode】141. 链表环

问题描述Given a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an integerposwhich represents the position (0-indexed)in the linked list where t...

2019-12-24 16:48:02 127

原创 【LeetCode】155. 小栈

问题描述Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top()...

2019-12-24 16:21:36 120

原创 【LeetCode】198. 入室偷窃

问题描述You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent...

2019-12-24 15:51:41 393

原创 【LeetCode】437. 路径求和(三)

问题描述You are given a binary tree in which each node contains an integer value.Find the number of paths that sum to a given value.The path does not need to start or end at the root or a leaf, but ...

2019-12-24 15:14:36 241

原创 【LeetCode】1. 两个数的和

问题描述Given an array of integers, returnindicesof the two numbers such that they add up to a specific target.You may assume that each input would haveexactlyone solution, and you may not use the...

2019-12-24 14:50:45 106

原创 【LeetCode】101. 对称树

问题描述Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).Bonus points if you could solve it both recursively and iteratively.给定一个二叉树,检查它是否是自身的镜像(即围绕其中心对称)...

2019-12-23 15:50:14 187

原创 【LeetCode】53. 最大子序列

问题描述Given an integer arraynums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum.If you have figured out the O(n) solution, try coding an...

2019-12-23 15:01:14 187

原创 【LeetCode】543. 二叉树的周长

问题描述Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of thelongestpath between any two nodes in a tree. This path may or...

2019-12-23 14:17:10 266

原创 【LeetCode】70. 爬楼梯

问题描述You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note:Givennwill be a po...

2019-12-23 14:11:43 142

原创 【LeetCode】121. 买入和卖出股票的最佳时间

问题描述Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the s...

2019-12-10 14:12:45 642

原创 【LeetCode】21. 合并两个有序链表

问题描述Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.合并两个已排序的链表,并以新链表的形式返回。新列表应该通过将前两个列表的节点拼接在一起来创建。输...

2019-12-10 13:34:18 170

原创 【LeetCode】169. 主要元素

问题描述Given an array of sizen, find the majority element. The majority element is the element that appearsmore than⌊ n/2 ⌋times.You may assume that the array is non-empty and the majority elemen...

2019-12-10 08:49:31 274

原创 【LeetCode】448. 找到数组中没有出现的元素

问题描述Given an array of integers where 1 ≤ a[i] ≤n(n= size of array), some elements appear twice and others appear once.Find all the elements of [1,n] inclusive that do not appear in this array....

2019-12-10 08:48:49 428

原创 【LeetCode】283. 移动所有的0元素

问题描述Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.Note:You must do thisin-placewithout making a copy of t...

2019-12-09 14:37:25 153

原创 【LeetCode】206. 反转一个单向链表

问题描述Reverse a singly linked list.A linked list can be reversed either iteratively or recursively. Could you implement both?反转一个单向链表。链表可以迭代或递归地反转。你能实现这两个吗?输入: 1->2->3->4->5->N...

2019-12-09 14:23:19 109

原创 【LeetCode】226. 左右颠倒二叉树

问题描述Invert a binary tree.颠倒一个二叉树输入: 4 / \ 2 7 / \ / \1 3 6 9输出: 4 / \ 7 2 / \ / \9 6 3 1Python 实现# Definition for a binary tree node.# ...

2019-12-09 13:46:48 206

原创 【LeetCode】136. 单个的数字

问题描述Given anon-emptyarray of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it with...

2019-12-09 13:37:49 125

原创 【LeetCode】104. 二叉树的最大深度

问题描述Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Note:A leaf is a node with no c...

2019-12-09 13:12:16 149

原创 【LeetCode】617. 合并两个二叉树

问题描述Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into a new binar...

2019-12-09 13:03:04 350

Java模式匹配demo

Java模式匹配demo

2023-09-22

MapStruct Java实例Demo

MapStruct Java实例Demo

2023-09-04

Java代理实战Demo

实现了常用的 cglib 代理以及 jdk 代理方式,涉及到各种常用的场景以及相关方法。

2023-08-09

orika Java实例Demo

orika Java实例Demo

2023-08-09

时间轮算法+延时队列实现任务队列Java Demo

多层时间轮,可根据配置的时间轮大小参数以及插入任务的相对时间,动态地创建不同层次的时间轮实例(这里的多层时间轮采用了相同的size)。引入了延时队列以减少空轮询,将时间轮的推进与任务的提交执行隔离开,提升模型的效率。

2022-10-22

vatic-install.sh

vatic 安装脚本,更新至 2020-01-27。脚本中涉及到相关 python 环境的配置安装,mysql、turkic、pyvision 文件的 clone 以及他们的启动。

2020-03-02

空空如也

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

TA关注的人

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