Some interesting concepts and data structures

Alok Ratnaparkhi
2 min readJun 18, 2023

--

Google S2: S2 is a library developed by Google for efficiently representing and manipulating geometric shapes on the surface of a sphere. It is specifically designed for working with spatial data, such as maps and location-based services. S2 uses a hierarchical indexing system that subdivides the sphere into regions of different sizes, allowing for fast and accurate spatial queries and computations. It employs the concept of Hilbert space-filling curves to map the 2D surface of the sphere onto a 1D space, enabling efficient indexing and traversal of the geometric data. By utilizing Hilbert curves, S2 preserves locality and enhances query performance, making it well-suited for spatial indexing and related tasks. They work differently than traditional GeoHashing techniques for proximity detection services.

Merkle Trees: Merkle trees, also known as hash trees, are data structures that enable efficient and secure verification of the integrity and consistency of large datasets. They work by recursively hashing data blocks, typically in a binary tree structure, where each node represents the hash of its children. Merkle trees are commonly used in blockchain technology to ensure the integrity of transaction data and provide an efficient way to verify the validity of blocks without needing to download the entire blockchain. They are also widely used in replication & consistency strategies of database systems.

Quad Trees: Quad trees are hierarchical data structures used to represent two-dimensional space. They partition a space into smaller quadrants recursively, forming a tree-like structure. Each node in the quad tree represents a rectangular region, and the tree can efficiently store and query spatial data. Quad trees are commonly used in computer graphics, image processing, and spatial indexing, enabling efficient searching, range queries, and collision detection in 2D space. They are especially useful when dealing with datasets that exhibit non-uniform distribution or when performing operations that involve spatial relationships.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Alok Ratnaparkhi
Alok Ratnaparkhi

Written by Alok Ratnaparkhi

Algorithms |AI | Machine learning

No responses yet

Write a response