Computer Science Training
I suggest using this list as a warm-up for interview preperation. Follow it up with interview problems from HackerRank , LeetCode , Cracking the coding interview or Programming Interviews Exposed . Alternatively go old school with Project Euler .
It can help to practice using coderpad.io , since it is used for many coding interviews.
Structure
Access^
Search^
Insertion^
Deletion^
Status
Stack
Θ(n)
Θ(n)
Θ(1)
Θ(1)
✔
Queue
Θ(n)
Θ(n)
Θ(1)
Θ(1)
✔
ArrayList
Θ(1)
Θ(n)
Θ(n)
Θ(n)
✔
Singly LinkedList
Θ(n)
Θ(n)
Θ(1)
Θ(1)
✔
Doubly LinkedList
Θ(n)
Θ(n)
Θ(1)
Θ(1)
✔
SkipList
Θ(log(n))
Θ(log(n))
Θ(log(n))
Θ(log(n))
✘
Set
Θ(n)
Θ(n)
Θ(1)
Θ(n)
✔
HashTable
N/A
Θ(1)
Θ(1)
Θ(1)
✔
Binary Search Tree
Θ(log(n))
Θ(log(n))
Θ(log(n))
Θ(log(n))
✔
Trie
✘
Graph
✔
Red-Black Tree
Θ(log(n))
Θ(log(n))
Θ(log(n))
Θ(log(n))
✘
^ = average
Pattern
Description
Status
Abstract Factory
Provides an interface for creating families of releated objects
✘
Builder
Builds a complex object using simple objects
✔
Factory Method
Defers instantiation of an object to a specialized function for creating instances
✔
Prototype
Co-opt one instance of a class for use as a breeder of all future instances
✘
Singleton
Restricts instantiation of a type to one object
✔
Pattern
Description
Status
Adapter
Wrap an existing class with a new interface
✔
Bridge
Decouples an interface from its implementation so that the two can vary independently
✘
Composite
Encapsulates and provides access to a number of different objects
✘
Decorator
Adds behavior to an object, statically or dynamically
✔
Facade
Uses one type as an API to a number of others
✘
Flyweight
Reuses existing instances of objects with similar/identical state to minimize resource usage
✘
Proxy
Provides a surrogate for an object to control it's actions
✔
Pattern
Description
Status
Chain of Responsibility
Avoids coupling sender and receiver
✘
Command
Bundles a command and arguments to call later
✘
Interpreter
Define a grammatical representation for a language
✘
Iterator
Access the elements of an aggregate object sequentially
✔
Mediator
Connects objects and acts as a proxy
✘
Memento
Generate an opaque token that can be used to go back to a previous state
✘
Observer
Provide a callback for notification of events/changes to data
✔
State
Encapsulates varying behavior for the same object based on its internal state
✘
Strategy
Enables an algorithm's behavior to be selected at runtime
✔
Template Method
Defines a skeleton class which defers some methods to subclasses
✘
Visitor
Separates an algorithm from an object on which it operates
✘
Got the table design and a bunch of pattern-definitions from this cool repo: https://github.com/tmrts/go-patterns