摘要: (Bridge Pattern) Bridge mode is also known as bridge mode and interface mode,It is to separate the abstract part from the concrete implementation part 阅读全文
posted @ 2021-05-01 22:28 UpGx 阅读(348) 评论(0) 推荐(0)
摘要: (Adapter Pattern) Its function is to turn the interface of one class into another interface that the client expects, so that classes that would otherw 阅读全文
posted @ 2021-04-27 22:57 UpGx 阅读(104) 评论(0) 推荐(0)
摘要: (Proxy Pattern) Provide proxies to other objects to control access to this object, with the aim of augmenting other objects, in short, similar to AOP, 阅读全文
posted @ 2021-04-22 18:39 UpGx 阅读(138) 评论(0) 推荐(0)
摘要: (Builder Pattern) Separating the creation of a complex object from its representation makes the same creation process have different representations, 阅读全文
posted @ 2021-04-19 12:36 UpGx 阅读(86) 评论(0) 推荐(0)
摘要: (Prototype Pattern) Creating a new object by copying, the caller does not need to know the creation details, does not call the constructor, is a creat 阅读全文
posted @ 2021-04-15 19:46 UpGx 阅读(75) 评论(0) 推荐(0)
摘要: (Singleton Pattern) Make sure that there is absolutely only one instance of a class in any case, and that a global access point is provided。Sometimes 阅读全文
posted @ 2021-04-12 17:21 UpGx 阅读(129) 评论(0) 推荐(0)
摘要: (factory pattern) Sometimes we may need a lot of code when creating a class, and if we put all this creation logic in a class, it is undoubtedly very 阅读全文
posted @ 2021-04-06 18:15 UpGx 阅读(362) 评论(0) 推荐(0)
摘要: 深度拷贝带随机指针的链表(Copy List with Random Pointer) 创建一个新对象,然后将当前对象的非静态字段复制到该新对象,无论该字段是值类型的还是引用类型,都复制独立的一份。当你修改其中一个对象的任何内容时,都不会影响另一个对象的内容,这是对java类深拷贝的描述。实际上就是 阅读全文
posted @ 2021-03-30 12:40 UpGx 阅读(154) 评论(0) 推荐(0)
摘要: ReverseLinkedList(翻转链表) 链表是一种物理存储单元上非连续、非顺序的存储结构,数据元素的逻辑顺序是通过链表中的指针链接次序实现的。非连续、非顺序指的是,通过指针把一组零散的内存块串联在一起,其中每一个内存块叫做链表的节点,所以每个节点包含两部分一个data(你存放的数据),一个n 阅读全文
posted @ 2021-03-15 16:43 UpGx 阅读(466) 评论(0) 推荐(0)
摘要: 时间&空间复杂度 时间复杂度: 通俗来说就是随着数据量的增加,程序运行的时间花费量是怎么变化的,时间复杂度常用大o表示。举个例子,猜数字,猜10个,100个、1000个,猜数的数据量是在增加的,但是实际运行程序花费的时间是怎么变化的呢,是线性的?常数的?还是指数的,它反映的是一个趋势。简而言之,时间 阅读全文
posted @ 2021-02-27 21:54 UpGx 阅读(352) 评论(0) 推荐(0)