Skip to content

Shuang's Crypto Notes

Learning new things!

Category: Data Structure

Data Structure –Map

both Rust and C++ basically give you two big “map families”:

  • ordered map (tree-based): keys kept sorted, predictable iteration order
  • unordered map (hash-based): keys not sorted, usually faster average lookups

What an ordered map actually is

BTreeMap (Rust) and std::map (C++) are not arrays.

They are balanced trees (B-tree …

Author shuangcrypto.comPosted on February 14, 2026February 14, 2026Categories Coding, Data StructureLeave a comment on Data Structure –Map

Queue related data structure

1) FIFO Queue (the classic queue)

Rule:
First In → First Out

append back, pop from front

Like people waiting for coffee.

enter:  A B C D
leave:  A B C D

Operations:

enqueue  (add at back)
dequeue  (remove from front)

Rust implementation

Use:

VecDeque
use std::collections::VecDeque;

let mut q 
…
Author shuangcrypto.comPosted on February 14, 2026February 14, 2026Categories Coding, Data StructureLeave a comment on Queue related data structure
 Hi, I am Shuang, a ZK/Cryptography engineer at Powdr. These are my somewhat messy learning notes about cryptography, security in general, and my hobbies. The "finer" notes list is here
  • Architecture
  • blockchain projects
  • Coding
  • coding general
  • Compiler
  • Compiler
  • Cryptographic principles
  • Data Structure
  • DevOps
  • Drafts but I wanna publish
  • ECC
  • Fundamental Protocols
  • GPU
  • Hash functions
  • Mathematical Background
  • optimization
  • Parallel computing
  • Plonky3
  • powdr
  • powdr-openVM
  • Prover Projects
  • Rust
  • stwo
  • Tools
  • Uncategorized
  • Zero Knowledge Proof
  • zk based on Multilinear polynomials
  • zk libraries
  • zkVM and zkEVM

Recent Posts

  • Data Structure –Map
  • Queue related data structure
  • Think as an architect
  • A piece of parallel computing code
  • Parallel Computing in Rust and C++ part 1

List of all posts

  • Publications
  • My CV
  • GitHub
  • LinkedIn
  • X

Hobbies

Handcrafts
  • Jewelry crafts
    • my online shop
  • Wood crafts
  • Sewing
  • Knitting
Sports
  • Rock climbing & bouldering
  • Running
Cooking
  • Recipes
Photography
  • portfolio

Useful links

  • Latex in Wordpress
  • Knowledge links
  • powdr command
  • what you want to know about powdr
  • Coding Tools & Tips
  • Shortcuts
  • Git

Shuang's Crypto Notes Proudly powered by WordPress