- Flyweight Pattern
Introduction The Flyweight Pattern is a structural design pattern that minimizes memory usage by sharing as much data as possible between similar objects. Imagine a text editor rendering a document with thousands of characters. Each character needs a font, size, and color — but most characters…
- Composite Pattern
Introduction The Composite Pattern is a structural design pattern that lets you compose objects into tree structures and then work with those structures as if they were individual objects. Think of a file system — a directory can contain files and other directories. Whether you ask for the size of…
- HashTable
The Hash table data structure stores elements in key-value pairs where Key– unique integer that is used for indexing the values Value – data that are associated with keys. The key is sent to a hash function that performs arithmetic operations on it. The result (commonly called the hash value or…
- Graph
A graph data structure is a collection of nodes that have data and are connected to other nodes. Let’s try to understand this through an example. On facebook, everything is a node. That includes User, Photo, Album, Event, Group, Page, Comment, Story, Video, Link, Note…anything that has data is a…
- Trees
Tree is a data structure similar to a linked list but instead of each node pointing simply to the next node in a linear fashion, each node points to a number of nodes. Tree is an example of non- linear data structures. A tree structure is a way of representing the hierarchical nature of a […]