An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem.

- Wiki
27 articles, 5 books. Go to books ↓

What does a loop entitle? It means that at the very end, the last node does not point to a null pointer as the next node, but instead it points to a previous node, so you keep looping through a number of nodes.

It turns out that the SHA-256 algorithm used for mining is pretty simple and can in fact be done by hand. Not surprisingly, the process is extremely slow compared to hardware mining and is entirely impractical. But performing the algorithm manually is a good way to understand exactly how it works.

Visualising data structures and algorithms through animation

We present jump consistent hash, a fast, minimal memory, consistent hash algorithm that can be expressed in about 5 lines of code. In comparison to the algorithm of Karger et al., jump consistent hash requires no storage, is faster, and does a better job of evenly dividing the key space among the buckets and of evenly dividing the workload when the number of buckets changes. Its main limitation is that the buckets must be numbered sequentially, which makes it more suitable for data storage applications than for distributed web caching.

Paxos is a family of algorithms for teaching a whole bunch of decidedly unreliable processes to reliably decide on stuff. More formally: it allows a group of unreliable processors to deterministically and safely reach consensus if some certain conditions can be met, while ensuring the group remains consistent if the conditions can’t be met.

You can use a Kalman filter in any place where you have uncertain information about some dynamic system, and you can make an educated guess about what the system is going to do next.

Sorting colours is a pain. There isn’t a magic function which will order them nicely, simply because the way we perceived them is based on three different components. Any attempt to flatten them onto one single dimension will inevitably collapse some of the complexity.

Let’s consider a map of locations. A salesperson wants to visit each location exactly once. What’s the optimal route? This is a classic problem in computer science called the travelling salesman problem.

Depth-first search is a simple way, to explore a graph.

Quick Sort also uses divide and conquer technique like merge sort, but does not require additional storage space. It is one of the most famous comparison based sorting algorithm which is also called as partition exchange sort. Like merge sort, it also uses recursive call for sorting elements.

Simply put, Big-O notation is how programmers talk about algorithms. A function's Big-O notation is determined by how it responds to different inputs. How much slower is it if we give it a list of 1000 things to work on instead of a list of 1 thing?

How can we design systems when we don't know what we're doing?

An algorithm for finding a Hamiltonian cycle in undirected planar graph, presented in this article, is based on an assumption, that the following condition works for every connected planar graph: graph G is Hamiltonian if and only if there is a subset of faces of G, whose merging forms a Hamiltonian cycle.

The amounts of data processed by applications are constantly growing. With this growth, scaling storage becomes more challenging. Every database system has its own tradeoffs. Understanding them is crucial, as it helps in selecting the right one from so many available choices.

There are two fundamental ways of graph search, which are the breadth-first search and the depth-first search. In this post, I’ll explain the depth-first search. Here, I focus on the relation between the depth-first search and a topological sort.