Search Results


13 matches found for 'hash table'

Unique Permutations

... usage. The better solution is actually not far-fetched from the brute force approach: use a hash table to store new permutations. If we encounter a permutation that is already stored in the hash table, skip the adding of that permutation.


Bloom Filter

A set data structure uses a hashing function to store values and to verify if a value exists. Bloom filters are similar in that it uses multiple hashing functions to store values and to verify if a value exists.


Counting the path of sums

... to make our algorithm faster. Basically, we are going to store the running total values into a hash table as we visit each node in the tree. If the values already exist in the hash table, we can look them up in constant time O(1).


Algorithm Handbook

... order Hash Tables There are multiple implementations that use a hash table, and they can be quite different. For example, a set and a dictionary (i.e.


B-Trees vs. LSM Trees

... as Bitcask, MongoDB and SQLite4. A simple log structured storage works by having an in-memory hash table (or hash index) that keeps track of keys and values. The values would be a byte offset reference inside an append-only log file (that is on disk, not in-memory), which contains the actual value string.


Perfect Squares

... - perfSquares[j]), i+1), f(total, i)) \) One optimization is to cache results, using a hash table, and recursively iterate from the smallest perfect square to the biggest perfect square.


Phone Number Mnemonics in Python

... 2-9 can be converted to a series of characters. Digits 0 and 1 do not need a conversion. A hash table is a good choice for storing the series of characters represented by digits 2-9.


4 Line Depth-first Search

Context Depth-first search (DFS) is a common searching algorithm for graphs, alongside Breadth-first search (BFS). DFS is useful for finding ways to solve mazes. It is also a vital ingredient for topological sorting.


RDBMS Indexing

Introduction As illustrated in this article, indexing is one of the easiest and most effective tweaks you can add to your SQL database. However, indexing might seem like magic, and you might also not be too sure which field to index in the first place.


RDBMS Optimization

Indexing Probably the easiest tweak to implement. It can usually be done with one SQL command. However, an index should be made based on a good column. For example, if you are frequently querying your rows by timestamp, then the timestamp can be chosen for an index.


Sharding Techniques

Introduction Sharding can be summarized as a technique in which a database table can be split into multiple database servers to optimize read/write performance. Benefits include: Optimized query time Instead of having one huge database table, you have multiple smaller tables in more than one machine.


NoSQL - the Radical Databases

NoSQL NoSQL is a category of databases that aren't relational. For example, MySQL would be a relational database, where as MongoDB would be a NoSQL database. Back then, relational databases were the tried-and-true, prevalent and reliable data stores.


Design Concepts

In this article, I want to go over some fundamental design concepts that are useful for coming up with system design. Requirements Functional Requirements Describes specific behaviors i.e. If a URL is generated, it is composed of a Base64 encoded alias Non-functional Requirements Describes architectural requirements i.