background
This article is included in the “Incomplete Guide to Advancement” column
As is usual with previous article series, the first article will be a background introduction and outline. This series is the same as before (writing skills are a no-go here).
First of all, let me express my purpose of writing:
- Share with my team members and friends, to complete the promised things, no remorse is enough!
- Trying to systematize the progression. Of course, there is no avoiding the fragmentation of content in the writing process, but I will also summarize it if I write enough content later (later, I will talk about it at that step later). Vision: It is enough to help newcomers take fewer detours!
- I hope I can give you some advice on the topic of career decisions. It is hard to avoid nagging in writing. I hope the fragments of words can arouse the resonance of filar threads, enough!
- Enhance your ability to share, write, and empathize (with time, with the reader).
- Mainly before the memorandum written piecemeal summary of all carding.
The foundation is not stable (internal unrest), why to build ten thousand high buildings (why to expand the territory).
Column introduces
Originally, this column is only about data structures and algorithms, but this morning a mysterious voice told me that you write data structures and algorithms is not feasible,(I am a obedient type) replied: OK, I will make a quick fix. (It makes sense to think about how embarrassing it is to create so many columns.) After a long ideological struggle, it is called “advanced incomplete guide.
Content module
Language difference again big, fall in the bottom is nothing more than the system disk read and write, memory allocation, CPU allocation, garbage collection, hardware instructions… This set of things, the realization of thousands of different, the thought is much the same.
If you understand the operating system/how it works, you will know that the language has the same purpose in some ways. (e.g. Javascript container v8=> browser)
Understanding data structures will help you understand why all languages have arrays, linked lists, and hashes, and how and when to use them.
Figure out the algorithms, and you’ll find a god when you write code. I think about it in a different way.
Understand design patterns, and productivity will multiply when you look at most of the framework principles.
This series will focus on data structure/algorithm/design patterns.
The data structure
First of all, what is included in the basic number structure is briefly introduced here, and then it will be discussed step by step.
- Data Structures
-
- Array: An array is a structure that can store multiple elements contiguously in memory. The allocation in memory is also contiguous. The elements in the array are accessed by the subscript of the array.
-
- Linked List: A linked list is a discontinuous, non-sequential storage structure on a physical storage unit. The logical order of data elements is achieved by the pointer address of the linked list. Each element contains two nodes: one is the data domain where the element is stored (the memory space), and the other is the pointer domain that points to the address of the next node. According to the pointer, the list can form different structures, such as single linked list, two-way linked list, circular linked list and so on.
-
- Stack: A special type of linear table that can only be operated on one end of the linear table. Operations are allowed at the top of the stack and not at the bottom. The characteristics of the stack are: first in last out, or last in first out, from the top of the stack to put an element is called on the stack, remove the element is called out of the stack. There are two main operations :push, which adds elements to the top (end) of the stack; Pop, removes the very top (end) element on the stack.
-
- Queues A queue, like a stack, is a linear table, except that a queue can add elements on one end and remove them on the other, i.e., first in first out. Putting an element from one end is called enqueuing, and taking an element out is called unqueuing.
-
- A heap is a special kind of data structure that can be thought of as an array of objects in a tree.
-
- Tree A tree is a data structure that is a hierarchical set of n(n>=1) finite nodes.
-
- A hash table, also known as a hash table, is a data structure that is accessed directly according to key codes and values. It can be mapped to a position in the set by key and value to quickly find the corresponding elements in the set.
-
- A graph consists of a finite set V of nodes and a set E of edges. There are matrices, adjacency lists and so on
This is just an overview, and we’ll take you through the data structure step by step. data
~~ Structures~ ~
Algorithm (algorithms)
- Searching query classes (Searches)
-
- BFS breadth traversal
-
- DFS deep traversal
-
- .
- Sort (Sorting),
-
- Bubblesort BubbleSort
-
- Quicksort
-
- .
- Other classes…
That’s just an overview, and we’re going to expand on this and use some of the data structures above to iterate
Design patterns (design patterns)
The design pattern comes from the crystallization of the wisdom of many experts (not the loss), and the design pattern considers the system’s reusability and extensibility. Design patterns provide a common design vocabulary and a common form for more effective internal communication.
Object Oriented Design Patterns
- Creation pattern
- Structural model
- Behavioral pattern
- .
Functional design patterns
- Improved version of the OOP Observer pattern
- .
Design patterns in JS
- The singleton pattern
- The strategy pattern
- .
That will unfold later, and all of it will be reflected in this column. The goal is to advance. Even the coming of God can’t stop me. I say! design~~~~
Note the module (see the content of the guide/reach a certain consensus)
- The content coding section of this series takes JavaScript. ;
- All the coding parts of this article will be uploaded to GitHub after optimization; The schematic code in the article is for logical reference only.
- Note that the coding section is written in a high-level language. There are objective factors such as compile time. With inaccuracy in complexity, the main purpose is to grasp the idea.
- Note that the coding part is written in JavaScript, and the implementation of the basic data structure is not “real” (for example, the implementation of arrays in JS has multiple forms of fast array and slow array (Hashtable)).
- Related code, test code can refer to the subsequent Git repository description.
- The content of this series will be a reference to GitHub’s existing repository, and a reference link will be posted for each subsequent article.
The last
Please don’t question the speed of my column updates, because trust each other (I’m sure you don’t. Ha ha ha).
In short, I promise to produce more than 1 column per week. I need to do some work behind each article: coding & coding test & article content improvement. Ask for a like.
There is still some hope:
I hope it can bring me a different way of thinking in the process of writing. Empathy.
I hope I can bring you something in the process of writing. The principle of common progress.
I hope it will be sunny tomorrow!