Definition and implementation of stack

Preface Language: Java Environment: IntelliJ IDEA JDK version: 1.8 Source code: GitHub Definition of stack A stack, also known as a stack, is a linear table with limited operations.Limits a linear table to insert and delete only at the end of the table.This end is called the top of the stack, while the other end is called the bottom.Inserti ...

Posted by Tonsil on Sat, 07 Sep 2019 20:49:58 +0200

Definition and implementation of queues

Preface Language: Java Environment: IntelliJ IDEA JDK Version: 1.8 Source code: GitHub Definition of queue Queue is a special linear table. It only allows deletion at the front of the table, but insertion at the back of the table. Like stack, queue is a restricted linear table. The end of the insertion operation is called the end of the que ...

Posted by poppy on Thu, 05 Sep 2019 07:25:12 +0200

Implementation of COO and CSR Based on Array Form for Sparse Matrix

Preface Language: Java Environment: IntelliJ IDEA JDK Version: 1.8 Source code: GitHub Reference article: https://www.cnblogs.com/xbinworld/p/4273506.html What is Sparse Matrix In a matrix, if the number of elements with a value of 0 is much more than that of non-zero elements, and the distribution of non-zero elements is irregular, the ma ...

Posted by otterbield on Tue, 03 Sep 2019 13:01:06 +0200

Design Patterns--Factory Patterns

Derive Simple Factory Mode from Pizza Project Factory Method Model Abstract factory pattern key point Pizza project: to facilitate the expansion of pizza varieties, to facilitate maintenance, to be able to run the expansion Pizza design: Define an abstract class of Pizza, define four methods prepare() abstract me ...

Posted by dannyz on Sun, 12 May 2019 00:22:47 +0200