Core Redis Architecture, Data Structures, and Operational Patterns
Core Data Types and Internal Structures
Redis supports five primary data structures, each optimized for specific use cases.
Strings
Binary-safe sequences capable of holding text, serialized objects, or binary data like images up to 512MB. They are the foundational type.
SET user:name "Alice"
GET user:name
MSET user:age 30 user:city "NYC"
INCR u ...
Posted on Mon, 13 Jul 2026 16:20:24 +0000 by tazgalsinh
Implementing Linked Lists in C
Linked List Types
Singly Linked List
Doubly Linked List
Circular Linked List
Node Insertion
Node Deletion
Code Implemantation
1. Node and List Structure
typedef struct ListNode {
int value;
struct ListNode* next;
} ListNode;
typedef struct LinkedList {
ListNode* first;
size_t count;
} LinkedList;
2. List Initialization
void ...
Posted on Sat, 11 Jul 2026 17:00:33 +0000 by weknowtheworld
Implicit Treap Implementation for Advanced Sequence Operations
Complex sequence manipulations such as range additions, reversals, cyclic shifts, insertions, deletions, and minimum queries can be efficiently handled using an Implicit Treap (also known as a non-rotating Treap or FHQ Treap). By leveraging split and merge operations based on subtree sizes, specific intervals can be isolated and modifications a ...
Posted on Sat, 11 Jul 2026 16:35:27 +0000 by phui_99
Relationship Between Trees, Binary Trees, and Heaps in Data Structures
Core Tree Terminology
Node Degree: The number of subtrees rooted at a node is defined as its degree.
Leaf Node (Terminal Node): Nodes with a degree of 0 are classified as leaf nodes.
Branch Node (Non-Terminal Node): Any node with a degree greater than 0 is a branch node.
Parent Node: A node that contains child nodes is the parent of its direct ...
Posted on Wed, 08 Jul 2026 16:15:30 +0000 by Jeroen_nld
Priority Queues in the APL Programming Language
Priority Queues in the APL Programming Language
Introduction
The concept of priority queues is fundamental in computer science. A priority queue is an abstract data type where each element has an associated priority. Elements are served based on their priority, with higher-priority items being processed first. Priority queues are widely used in ...
Posted on Mon, 06 Jul 2026 17:22:42 +0000 by hiroshi_satori
Linked List Problem Solving: Swapping Nodes, Removing by Index, Finding Intersections, and Detecting Cycles
Swapping Adjacent Nodes in a Linked ListSwapping nodes in pairs requires careful pointer manipulation to maintain the integrity of the list structure. The core idea involves processing two nodes at a time, reversing their connection order while preserving links to neighboring nodes.A dummy header node simplifies edge cases by providing a consis ...
Posted on Mon, 06 Jul 2026 17:19:41 +0000 by pug
XCPC Nanjing Regional Problem Solutions: B, G, and H
Problem B: What, More Kangaroos?
Operations 1 and 2 nullify eachother, as do operations 3 and 4. The problem reduces to applying positive integer operations on two buttons only, yielding four enumeration cases.
With operations 1 and 3 chosen, let operation 1 execute x times and operation 3 execute y times (x, y > 0). The goal is maximizing i ...
Posted on Mon, 06 Jul 2026 17:09:43 +0000 by jgetner
Implementing Dynamic Resource Management with C++ STL Set
The problem requires managing a collection of distinct integer values (representing log lengths). We need to support two main operations: adding a unique value and retrieving/removing either an exact value or the one closest to it. Given the requirements for uniqueness and efficient searching, the std::set container in C++ is an ideal choice, a ...
Posted on Sun, 05 Jul 2026 17:21:57 +0000 by bloom
Understanding and Implementing Singly Linked Lists in C
Introduction to Singly Linked Lists
A singly linked list is a fundamental data structure consisting of nodes where each node contains data and a pointer to the next node in the sequence. Unlike arrays, linked lists don't require contiguous memory allocation, making them flexible for dynamic data storage.
The structure resembles a train where ea ...
Posted on Sun, 05 Jul 2026 16:22:48 +0000 by Cogen2
Core Linear Data Structures and Their Initialization Techniques in C++
Data structures fall into two broad categories: linear and nonlinear. Linear structures include arrays, linked lists, stacks, and queues; nonlinear ones encompass trees, heaps, hash tables, and graphs.
Array
An array stores elements of identical type in contiguous memory locations, with a fixed length once allocated.
Method 1 – Fixed-size decla ...
Posted on Sat, 04 Jul 2026 17:14:50 +0000 by crash58