摘要:
传送门 传送门2 阅读全文
摘要:
Cargo是Rust的构建系统和包管理器。大多数Rustacean们使用Cargo来管理他们的Rust项目,因为它可以为你处理很多任务,比如构建代码、下载依赖库并编译这些库。(我们把代码所需要的库叫做依赖 dependencies)。(学习) 基本结构 当我们使用Intellij创建一个新项目,名字 阅读全文
摘要:
1. Cargo setup What is Cargo? using rustup to setup: curl https://sh.rustup.rs -sSf | sh johnnys-MacBook-Pro:~ johnny$ curl https://sh.rustup.rs -sSf| 阅读全文
摘要:
命令(Command)模式属于对象的行为模式。命令模式又称为行动(Action)模式或交易(Transaction)模式。(学习) 命令模式把一个请求或者操作封装到一个对象中。命令模式允许系统使用不同的请求把客户端参数化,对请求排队或者记录请求日志,可以提供命令的撤销和恢复功能。 命令模式的结构 命 阅读全文
摘要:
package LeetCode_918 /** * 918. Maximum Sum Circular Subarray * https://leetcode.com/problems/maximum-sum-circular-subarray/ * Given a circular array 阅读全文
摘要:
今天在学习设计模式时发现一个不错的画类图工具-PlantUML, 传送门,它除了可以画UML,还支持其它,请查看。 以下是我使用PlantUML语法的例子: @startuml abstract class Drink{ + String description - float price floa 阅读全文
摘要:
/** * This problem was asked by Yahoo. Recall that a full binary tree is one in which each node is either a leaf node, or has two children. Given a bi 阅读全文
摘要:
平时阅读一些源码分析类文章各是设计应用架构时没少与UML类图打交道。实际上,UML类图中最常用到的元素我们很快就能掌握,下面我们一起认识UML。 一、类的属性的表示方式 在uml类图中,类使用包含类名、属性(field)和方法(method)且带有分割线的矩形来表示,比如下图表示一个Employee 阅读全文
摘要:
package LeetCode_1753 /** * 1753. Maximum Score From Removing Stones * https://leetcode.com/problems/maximum-score-from-removing-stones/ * You are pla 阅读全文
摘要:
package LeetCode_1754 /** * 1754. Largest Merge Of Two Strings * https://leetcode.com/problems/largest-merge-of-two-strings/ * You are given two strin 阅读全文