Computer science basics learn and practice project.
I've created this project for practice in Golang and CS basics.
TDD is big part of the project ideology, I'm trying to follow it and realize pros
and cons
.
-
A linked list is a linear data structure where each element is a separate object. Each element (we will call it a node) of a list is comprising of two items - the data and a reference to the next node. The last node has a reference to null. The entry point into a linked list is called the head of the list. (cs.cmu.edu)
-
A doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains three fields: two link fields (references to the previous and to the next node in the sequence of nodes) and one data field in between. (wikipedia)
-
A queue is a collection in which the entities in the collection are kept in order and the principal operations on the collection are the addition of entities to the rear terminal position, known as enqueue, and removal of entities from the front terminal position, known as dequeue. (wikipedia)
-
A stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. (wikipedia)
-
A hashmap is a general-purpose data structure for storing a group of objects. A dictionary (a.k.a hashmap) has a set of keys and each key has a single associated value. (wikipedia)
-
A heap is a specialized tree-based data structure which is essentially an almost complete tree that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (in a max heap) or less than or equal to (in a min heap) the key of C. (wikipedia)
-
A binary tree is a tree data structure in which each node has at most two children, which are referred to as the
left child
and theright child
. A recursive definition using just set theory notions is that a (non-empty) binary tree is a tuple (L, S, R), where L and R are binary trees or the empty set and S is a singleton set. Some authors allow the binary tree to be the empty set as well. (wikipedia) -
A graph is an abstract data type that is meant to implement the undirected graph and directed graph concepts from mathematics; specifically,the field of graph theory. A graph data structure consists of a finite (and possibly mutable) set of
vertices
(also called nodes or points), together with a set of unordered pairs of these vertices for an undirected graph or a set of ordered pairs for a directed graph. These pairs are known asedges
(also called links or lines), and for a directed graph are also known as arrows. (wikipedia)
Project is in "work in progress" stage, I'll continue add a new data structures here.