A linked list is a data structure made up of multiple elements where each element contains a pointer to the next element in the list in a daisy chain fashion. Some advantage of a linked list include the ability to easily and efficiently insert and remove elements from the list as well as not needing to define an initial size as they can grow and shrink during run-time. They do however lack efficiency when attempting to access a specific element in the list, due to their linear nature. The only way to access a specific element in the list is to iterate sequentially from the first element until the desired element.
Author: masonmossdev
VarInt Encoding For Integers
VarInt is a way of storing integers in such a way that only the bytes required by the integer are used. This means that smaller integers require less memory than larger integers. This method is a lot more efficient than simply using, for example, a 32 bit integer to represent a value such as 200, which should only require 8 bits of storage.
Endianness
The Endianess of a word refers to the byte order which makes up the word. We can either store the MSB (Most Significant Byte) in the smallest address which is known as Big Endian or we can store the LSB (Least Significant Byte) in the smallest address which is known as Little Endian.
Two’s Complement
Two’s complement is the method used by computers to represent integers in binary format. A binary number with an LMb (Left Most bit) of 1 is negative, while a binary number with an LMb of 0 is either a positive number, or 0. The method involves writing out the value in binary format and then inverting the binary value and adding 1.