๐Ÿง  lunaris engine

Temporary Logo

A comprehensive, fast, and extensible algorithms library for Dart. Includes classic and modern techniques for lists, sets, maps, strings, and graphs โ€” built with clean APIs and strong generics.


  • Actively maintained with ambitious roadmap (1,000+ algorithms planned)
  • Type-safe generics across the library
  • Readable code with clear documentation and tests

Environment: Dart SDK โ‰ฅ 3.7.2 (see pubspec.yaml).


๐Ÿค– Machine Learning & AI

Supervised, unsupervised, and deep learning models:

  • linear_regression, logistic_regression, decision_tree, random_forest, svm, knn, naive_bayes, gradient_boosting, xgboost_like, gradient_boosting_classifier, lightgbm_like, catboost_like
  • ann, cnn, rnn, lstm, gru, transformer, gan
  • simulated_annealing, genetic_algorithm, particle_swarm, bayesian_optimization, mdp

๐Ÿ•ธ๏ธ Graph Algorithms

Classic and advanced graph/network algorithms:

  • johnsons_algorithm, dinics_algorithm, stoer_wagner_min_cut, yens_algorithm, hierholzer, tarjans_scc
  • weighted_edge, bfs, dfs, topological_sort, connected_components, cycle_detection, bipartite_graph, shortest_path, dijkstra, bellman_ford, floyd_warshall, mst_kruskal, mst_prim, kosaraju_scc, articulation_points, eulerian_path, hamiltonian_path, chinese_postman, transitive_closure, graph_coloring, spfa, bridge_finding, tree_diameter, union_find

๐Ÿ“ฆ Dynamic Programming & Combinatorics

DP, memoization, and combinatorial algorithms:

  • fibonacci_memoization, knapsack_01, longest_increasing_subsequence, longest_common_subsequence, edit_distance, matrix_path_sum, coin_change, subset_sum, partition_equal_subset_sum, house_robber, jump_game, alternating_subsequences, rod_cutting, minimum_path_sum, unique_paths_with_obstacles, decode_ways, interleaving_string, coin_change_bottom_up, paint_house, burst_balloons, longest_bitonic_subsequence, matrix_chain_multiplication, count_palindromic_subsequences, min_cuts_palindrome_partitioning, max_sum_increasing_subsequence, cherry_pickup, wildcard_matching, regex_matching

๐Ÿ—œ๏ธ Compression

Classic and modern compression algorithms:

  • huffman, lzw, rle, arithmetic, bwt

๐Ÿ” Cryptography

Cryptographic primitives and mining:

  • sha256, ripemd160, keccak256, scrypt, argon2, ecdsa, eddsa, bls_signatures, scrypt_mining

โ›“๏ธ Consensus & Blockchain

Distributed consensus and blockchain protocols:

  • proof_of_work, proof_of_stake, delegated_proof_of_stake, proof_of_authority, proof_of_burn, proof_of_capacity, proof_of_elapsed_time, bft, pbft, fba

๐ŸŒ Routing & Wireless

Network routing and wireless/P2P protocols:

  • bgp_algorithm, ospf_algorithm, rip_algorithm, link_state_routing, distance_vector_routing
  • aodv, dsr, chord, kademlia

๐Ÿ“ฆ Install lunaris engine

Use in your Dart or Flutter project.

Dart

dart pub add lunaris_engine

Flutter

flutter pub add lunaris_engine

๐Ÿš€ Quick start algorithm

import 'package:lunaris_engine/lunaris_engine.dart';
import 'package:lunaris_engine/graph_algorithms/weighted_edge.dart';

void main() {
  // List: binary search and sorting
  final idx = binarySearch<int>([1, 3, 5, 7, 9], 7);
  final sorted = mergeSort<int>([5, 2, 4, 6, 1, 3]);

  // String: algorithms
  final isPal = isPalindrome('A man a plan a canal Panama');
  final lcp = longestCommonPrefix(['flower', 'flow', 'flight']);

  // Graph: Dijkstra over weighted edges
  final graph = <String, List<WeightedEdge<String>>>{
    'A': [WeightedEdge('A', 'B', 1), WeightedEdge('A', 'C', 4)],
    'B': [WeightedEdge('B', 'C', 2)],
    'C': [],
  };
  final dist = dijkstra(graph, 'A');

  // Tree: binary tree operations
  final root = BinaryTreeNode<int>(10);
  root.left = BinaryTreeNode<int>(5);
  root.right = BinaryTreeNode<int>(15);
  final inorder = inorderTraversal(root);
  final isValid = validateBST(root);

  // Linked List: basic operations
  final list = LinkedListNode.fromList<int>([1, 2, 3, 4, 5]);
  final reversed = reverseLinkedList(list);
  final hasCycle = detectCycle(list);

  print([idx, sorted, isPal, lcp, dist, inorder, isValid, reversed, hasCycle]);
}

For a full tour, see example/lunaris_engine_example.dart, example/tree_algorithms_example.dart, and example/linked_list_algorithms_example.dart.


๐Ÿงฉ Algorithms included

List algorithms

  • binary_search, linear_search
  • merge_sort, quick_sort, bubble_sort, insertion_sort, selection_sort
  • counting_sort (non-negative ints)
  • reverse_list, find_max_min, find_duplicates, remove_duplicates
  • kadanes_algorithm
  • max_sum_subarray_of_size_k, min_sum, average_subarray, prefix_sum, two_sum_sorted
  • rotate_array_right

Set algorithms

  • has_duplicates, has_two_sum, has_unique_window
  • disjoint_set (Union-Find), find_intersection, set_difference, is_frequency_unique

Map algorithms

  • frequency_count, most_frequent_element, top_k_frequent
  • group_by_key, first_non_repeated_element
  • anagram_checker (generic list-based)
  • two_sum (indices), lru_cache, length_of_longest_substring

String algorithms

  • reverse_string, palindrome_checker, anagram_checker
  • brute_force_search, kmp_search, rabin_karp_search
  • longest_common_prefix, longest_palindromic_substring
  • edit_distance, string_compression, count_vowels_consonants

Graph algorithms (new)

  • bfs, dfs, topological_sort
  • connected_components, cycle_detection (directed/undirected), bipartite_graph
  • shortest_path (unweighted BFS), weighted_edge (utility)
  • dijkstra, bellman_ford, floyd_warshall
  • mst_kruskal, mst_prim
  • kosaraju_scc, articulation_points, union_find (typedef)

Tree algorithms (new)

  • binary_tree_node (generic tree node)
  • tree_traversals (inorder, preorder, postorder)
  • level_order_traversal (BFS)
  • tree_depth (height calculation)
  • invert_tree (mirror tree)
  • lowest_common_ancestor (LCA)
  • validate_bst (BST validation)
  • tree_diameter (longest path)
  • balanced_tree_check (height-balanced check)
  • tree_serialization (serialize/deserialize)
  • zigzag_traversal (alternating level order)

Linked List algorithms (new)

  • linked_list_node (generic singly linked list node)
  • doubly_linked_list_node (generic doubly linked list node)
  • insert_delete_at_position (insert/delete at specific positions)
  • reverse_linked_list (iterative, recursive, group reverse, reverse between)
  • detect_cycle (Floyd's cycle detection algorithm)
  • merge_sorted_lists (merge two sorted linked lists)
  • remove_nth_from_end (remove nth node from end)
  • palindrome_linked_list (check if linked list is palindrome)
  • intersection_of_lists (find intersection point of two lists)

Each function includes Dartdoc with usage and time/space complexity.


๐Ÿ“š Usage notes

  • Import everything via package:lunaris_engine/lunaris_engine.dart.
  • Sorting/searching functions use T extends Comparable where appropriate.
  • Weighted graph utilities use WeightedEdge<T>.
  • Algorithms are pure and side-effect free unless documented otherwise.

๐Ÿงช Running tests

dart test

All tests pass in the repository (see test/).

๐Ÿค Contributing

Contributions are welcome!

  • Add new algorithms or optimize existing ones
  • Improve docs and examples
  • Increase test coverage

Open a PR with a brief description and test cases.


๐Ÿ—บ๏ธ Roadmap (short-term)

  • Expand graph algorithms (SPFA, Johnson, Edmonds-Karp, Dinic)
  • Add tree/heap/DP/geometry modules
  • Benchmarks and performance docs

๐Ÿ“„ License

MIT. See LICENSE.

lunaris-engine

Libraries

Backtracking/combination_sum
Backtracking/combinations
Backtracking/letter_combinations_phone_number
Backtracking/n_queens
Backtracking/permutations
Backtracking/rat_in_a_maze
Backtracking/subset_generation
Backtracking/sudoku_solver
Compression/arithmetic
Simple arithmetic coder (order-0) for demonstration/testing
Compression/bwt
Burrowsโ€“Wheeler Transform (BWT) and inverse
Compression/huffman
Huffman Coding (byte-oriented)
Compression/lzw
LZW compression (byte-oriented)
Compression/rle
Run-Length Encoding (RLE)
Consensus/bft
Consensus/delegated_proof_of_stake
Delegated Proof of Stake (DPoS) - delegate scheduling
Consensus/fba
Federated Byzantine Agreement (FBA) - quorum slices simulation
Consensus/gossip_protocol
๐ŸŒ Gossip Protocol Implementation for Distributed Systems
Consensus/pbft
Practical Byzantine Fault Tolerance (PBFT) - simplified engine
Consensus/proof_of_authority
Proof of Authority (PoA) - authority-based block production
Consensus/proof_of_burn
Proof of Burn (PoB) - burn-and-weight mechanics
Consensus/proof_of_capacity
Proof of Capacity / Proof of Space - plotting & selection primitives
Consensus/proof_of_elapsed_time
Proof of Elapsed Time (PoET) - trusted wait simulation
Consensus/proof_of_stake
Proof of Stake (PoS) - staking and slot selection primitives
Consensus/proof_of_work
Proof of Work (PoW) - production-minded simulation
Cryptographic/argon2
๐Ÿ” Argon2 Key Derivation Function Implementation
Cryptographic/bls_signatures
๐Ÿ” BLS (Boneh-Lynn-Shacham) Signatures Implementation
Cryptographic/ecdsa
๐Ÿ” ECDSA (Elliptic Curve Digital Signature Algorithm) Implementation
Cryptographic/eddsa
๐Ÿ” EdDSA (Ed25519) Digital Signature Algorithm Implementation
Cryptographic/keccak256
๐Ÿ” Keccak-256 (SHA-3) Cryptographic Hash Algorithm Implementation
Cryptographic/ripemd160
๐Ÿ” RIPEMD-160 Cryptographic Hash Algorithm Implementation
Cryptographic/scrypt
๐Ÿ” Scrypt Key Derivation Function Implementation
Cryptographic/scrypt_mining
โ›๏ธ Scrypt Mining Algorithm Implementation
Cryptographic/sha256
๐Ÿ” SHA-256 Cryptographic Hash Algorithm Implementation
dp_algorithms/alternating_subsequences
dp_algorithms/burst_balloons
๐ŸŽˆ Burst Balloons (DP)
dp_algorithms/cherry_pickup
๐Ÿ’ Cherry Pickup (DP - complex)
dp_algorithms/coin_change
dp_algorithms/coin_change_bottom_up
dp_algorithms/count_palindromic_subsequences
dp_algorithms/decode_ways
dp_algorithms/edit_distance
dp_algorithms/fibonacci_memoization
dp_algorithms/house_robber
dp_algorithms/interleaving_string
dp_algorithms/jump_game
dp_algorithms/knapsack_01
dp_algorithms/longest_bitonic_subsequence
dp_algorithms/longest_common_subsequence
dp_algorithms/longest_increasing_subsequence
dp_algorithms/matrix_chain_multiplication
dp_algorithms/matrix_path_sum
dp_algorithms/max_sum_increasing_subsequence
dp_algorithms/min_cuts_palindrome_partitioning
dp_algorithms/minimum_path_sum
dp_algorithms/paint_house
dp_algorithms/partition_equal_subset_sum
dp_algorithms/regex_matching
dp_algorithms/rod_cutting
dp_algorithms/subset_sum
dp_algorithms/unique_paths_with_obstacles
dp_algorithms/wildcard_matching
Graph/articulation_points
๐Ÿงฉ Articulation Points (Cut Vertices)
Graph/bellman_ford
๐Ÿงฎ Bellman-Ford Algorithm (Single-Source Shortest Paths)
Graph/bfs
๐ŸŽฏ Breadth-First Search (BFS)
Graph/bipartite_graph
๐ŸŽจ Bipartite Graph Check (Two-Coloring via BFS)
Graph/bridge_finding
Graph/chinese_postman
Graph/connected_components
๐Ÿ”— Connected Components (Undirected)
Graph/cycle_detection
โ™ป๏ธ Cycle Detection
Graph/dfs
๐Ÿงญ Depth-First Search (DFS)
Graph/dijkstra
๐Ÿšฆ Dijkstra's Algorithm (Single-Source Shortest Paths)
Graph/dinics_algorithm
Graph/edmonds_karp
Graph/eulerian_path
Graph/floyd_warshall
๐ŸŒ Floyd-Warshall (All-Pairs Shortest Paths)
Graph/graph_coloring
Graph/hamiltonian_path
Graph/hierholzer
Graph/johnsons_algorithm
Graph/kosaraju_scc
๐Ÿ” Kosaraju's Algorithm (Strongly Connected Components)
Graph/mst_kruskal
๐ŸŒฒ Kruskal's Algorithm (Minimum Spanning Tree/Forest)
Graph/mst_prim
๐ŸŒฟ Prim's Algorithm (Minimum Spanning Tree/Forest)
Graph/shortest_path
๐Ÿ›ค๏ธ Shortest Path (Unweighted) via BFS
Graph/spfa
Graph/stoer_wagner_min_cut
Graph/tarjans_scc
Graph/topological_sort
โ›“๏ธ Topological Sort (Kahn's Algorithm)
Graph/transitive_closure
Graph/tree_diameter
Graph/union_find
๐Ÿ”— Union-Find (Disjoint Set Union, DSU)
Graph/weighted_edge
๐Ÿงฑ Weighted Edge
Graph/yens_algorithm
LinkedList/add_two_numbers_linked_list
โž• Add Two Numbers (Linked List Representation) โ€” safe big-integer style add
LinkedList/convert_binary_linked_list_to_int
๐Ÿ”ข Convert Binary Number in Linked List to Integer โ€” MSB-first parsing
LinkedList/detect_and_remove_loop
๏ฟฝ Detect and Remove Loop in Linked List โ€” Floyd's cycle detection + repair
LinkedList/detect_cycle
๐Ÿ” Cycle Detection Algorithms (Floyd's Algorithm)
LinkedList/doubly_linked_list_node
๐Ÿ”—๐Ÿ”— Generic Doubly Linked List Node
LinkedList/insert_delete_at_position
๐Ÿ“ Insert and Delete at Position Algorithms
LinkedList/intersection_detection_hashset
๐Ÿ”— Intersection Detection using HashSet โ€” O(m + n) detection preserving nodes
LinkedList/intersection_of_lists
๐Ÿ”— Intersection of Two Linked Lists Algorithm
LinkedList/linked_list_node
๐Ÿ”— Generic Linked List Node
LinkedList/merge_sort_linked_list
๏ฟฝ Sort Linked List (Merge Sort) โ€” scalable, stable, generic
LinkedList/merge_sorted_lists
๐Ÿ”— Merge Sorted Linked Lists Algorithms
LinkedList/palindrome_linked_list
๐ŸŽญ Palindrome Linked List Algorithm
LinkedList/partition_list
๏ฟฝ Partition Linked List โ€” stable partition preserving relative order
LinkedList/remove_duplicates_sorted_list
๐Ÿงน Remove Duplicates from Sorted Linked List โ€” in-place deduplication
LinkedList/remove_nth_from_end
๐Ÿ—‘๏ธ Remove Nth Node From End Algorithm
LinkedList/reverse_linked_list
๐Ÿ”„ Reverse Linked List Algorithms
LinkedList/reverse_nodes_in_k_group
๏ฟฝ Reverse Nodes in K-Group โ€” in-place group-wise reversal
LinkedList/rotate_linked_list
๏ฟฝ Rotate Linked List โ€” robust, generic implementation
LinkedList/swap_nodes_in_pairs
๏ฟฝ Swap Nodes in Pairs โ€” safe adjacent node swapping
List/average_subarray
๐Ÿ” Generic Binary Search Algorithm
List/bubble_sort
List/counting_sort
List/find_duplicates
List/find_max_min
List/insertion_sort
List/kadanes_algorithm
List/max_sum_subarray_of_size_k
List/merge_sort
merge_sort.dart
List/min_sum
List/prefix_sum
List/quick_sort
List/remove_duplicates
List/reverse_list
List/rotate_array_right
List/selection_sort
List/two_sum_sorted
ListAdvancedSorts/bitonic_sort
ListAdvancedSorts/bucket_sort
ListAdvancedSorts/comb_sort
ListAdvancedSorts/cycle_sort
ListAdvancedSorts/gnome_sort
ListAdvancedSorts/heap_sort
ListAdvancedSorts/max_product_subarray
ListAdvancedSorts/odd_even_sort
ListAdvancedSorts/pancake_sort
ListAdvancedSorts/pigeonhole_sort
ListAdvancedSorts/quickselect
ListAdvancedSorts/radix_sort
ListAdvancedSorts/shell_sort
ListAdvancedSorts/stooge_sort
lunaris_engine
Support for doing something awesome.
MachineLearning/actor_critic
Actor-Critic (minimal)
MachineLearning/ann
๐Ÿง  Artificial Neural Network (ANN)
MachineLearning/autoencoder
๐Ÿง  Autoencoder (simple dense feed-forward encoder/decoder)
MachineLearning/bayesian_optimization
Bayesian Optimization (surrogate-based) - compact
MachineLearning/catboost_like
๐Ÿฑ CatBoost-like Regressor (simplified)
MachineLearning/cnn
๐Ÿ–ผ๏ธ Convolutional Neural Network (CNN)
MachineLearning/dbscan
๐ŸŒŠ DBSCAN (Density-Based Spatial Clustering of Applications with Noise)
MachineLearning/decision_tree
๐ŸŒณ Decision Tree Classifier (CART-style, numeric features)
MachineLearning/dqn
Deep Q-Network (DQN) - minimal numeric example
MachineLearning/gan
๐ŸŽญ Generative Adversarial Network (GAN)
MachineLearning/genetic_algorithm
Genetic Algorithm (generic)
MachineLearning/gmm
๐Ÿ”” Gaussian Mixture Model (Expectation-Maximization)
MachineLearning/gradient_boosting
โšก Gradient Boosting Regressor (stumps)
MachineLearning/gradient_boosting_classifier
๐Ÿง  Gradient Boosting Classifier (simple logistic variant)
MachineLearning/gru
๐Ÿ” Gated Recurrent Unit (GRU)
MachineLearning/hierarchical_clustering
๐ŸŒฒ Hierarchical Clustering (agglomerative, production-aware)
MachineLearning/kmeans
๐Ÿ”ถ k-Means Clustering (robust, production-minded)
MachineLearning/knn
๐Ÿ”Ž k-Nearest Neighbors (k-NN) Classifier
MachineLearning/lightgbm_like
๐ŸŒฉ LightGBM-like Regressor (simplified)
MachineLearning/linear_regression
๐Ÿ“ˆ Linear Regression (Ordinary Least Squares)
MachineLearning/logistic_regression
๐Ÿ”ข Logistic Regression (binary, gradient descent)
MachineLearning/lstm
๐Ÿ” Long Short-Term Memory (LSTM)
MachineLearning/mcts
Monte Carlo Tree Search (MCTS) - minimal implementation
MachineLearning/mdp
Markov Decision Process (MDP) utilities - generic
MachineLearning/naive_bayes
๐Ÿงฎ Gaussian Naive Bayes (continuous features)
MachineLearning/particle_swarm
Particle Swarm Optimization (PSO) - generic
MachineLearning/pca
๐Ÿ“ Principal Component Analysis (PCA)
MachineLearning/policy_gradient
Policy Gradient (REINFORCE) - minimal numeric implementation
MachineLearning/ppo
Proximal Policy Optimization (PPO) - lightweight stub
MachineLearning/q_learning
Q-Learning (tabular)
MachineLearning/random_forest
๐ŸŒฒ Random Forest Classifier (bagging of decision trees)
MachineLearning/rnn
๐Ÿ” Recurrent Neural Network (RNN)
MachineLearning/sarsa
SARSA (on-policy TD control)
MachineLearning/simulated_annealing
Simulated Annealing (generic)
MachineLearning/svm
๐Ÿงญ Support Vector Machine (linear SVM, primal hinge loss)
MachineLearning/transformer
๐Ÿ” Transformer (encoder-style minimal)
MachineLearning/tsne
๐ŸŽฏ t-SNE (t-distributed Stochastic Neighbor Embedding)
MachineLearning/xgboost_like
๐Ÿงฐ Simplified XGBoost-like Regressor (stump + second-order)
map/all_pairs_with_sum
map/anagram_checker
map/count_pairs_with_diff
map/find_subarrays_with_sum
map/first_non_repeated_element
map/frequency_count
map/group_anagrams
map/group_by_key
map/index_mapping
map/invert_map
map/length_of_longest_substring
map/lru_cache
map/merge_maps_conflict
map/min_window_substring
map/most_frequent_element
map/mru_cache
map/top_k_frequent
map/two_sum
map/word_frequency_ranking
matrix/flood_fill
matrix/island_count_bfs
matrix/island_count_dfs
matrix/matrix_rotation
matrix/path_sum
matrix/shortest_path_in_grid
matrix/spiral_traversal
matrix/surrounded_regions
network/a_star
๐ŸŽฏ A* Algorithm (Optimal Path Finding with Heuristics)
network/dinics_algorithm
โšก Dinic's Algorithm (High-Performance Maximum Flow)
network/edmonds_karp
๐Ÿš€ Edmonds-Karp Algorithm (Improved Maximum Flow)
network/ford_fulkerson
๐ŸŒŠ Ford-Fulkerson Algorithm (Maximum Flow)
network/network_algorithms
๐ŸŒ Network Algorithms Library
network/tarjans_algorithm
๐Ÿ”— Tarjan's Algorithm (Bridges and Articulation Points)
network/union_find
๐Ÿ”— Union-Find / Disjoint Set Data Structure
networkAdv/cidr
networkAdv/http_probe
networkAdv/ip_utils
networkAdv/network_helpers
networkAdv/prioritize
networkAdv/reporting
networkAdv/socket_probe
networkAdv/timeout
networkAdv/tls
networkop/edmonds_blossom
Edmonds' Blossom algorithm for maximum matching in general graphs
networkop/hungarian
Hungarian Algorithm (Kuhnโ€“Munkres) for assignment problems
networkop/max_flow_min_cut
Maximum Flow (Dinic) and Minimum s-t Cut utilities
networkop/min_cost_flow
Minimum-Cost Maximum Flow (Successive Shortest Path with potentials)
numerical/bisection
numerical/differentiation
High-accuracy numerical differentiation utilities.
numerical/integration
Numerical integration utilities with high-quality composite rules.
numerical/lu_decomposition
numerical/newton_raphson
numerical/qr_decomposition
QR decomposition using Householder reflections.
RoutingNET/bgp_algorithm
๐ŸŒ BGP (Border Gateway Protocol) Algorithm
RoutingNET/distance_vector_routing
๐Ÿ“ก Distance-Vector Routing Algorithm
๐Ÿ—บ๏ธ Link-State Routing Algorithm
RoutingNET/ospf_algorithm
๐ŸŒ OSPF (Open Shortest Path First) Algorithm
RoutingNET/rip_algorithm
๐Ÿ›ฃ๏ธ RIP (Routing Information Protocol) Algorithm
Set/bloom_filter
๐ŸŒธ Bloom Filter Implementation for High-Performance Data Filtering
Set/disjoint_check
Set/disjoint_set
Set/find_intersection
Set/has_duplicates
Set/has_two_sum
Set/has_unique_window
Set/is_frequency_unique
Set/list_to_set_preserve_order
Set/multiset_operations
Set/power_set
Set/set_difference
Set/subset_check
Set/superset_check
Set/symmetric_difference
String/anagram_checker
String/atoi
String/count_vowels_consonants
String/edit_distance
String/integer_roman
String/longest_common_prefix
String/longest_palindromic_substring
String/longest_repeating_substring
String/manacher_longest_palindrome
String/min_window_subsequence
String/palindrome_checker
String/remove_consecutive_duplicates
String/reverse_string
String/rolling_hash
String/string_compression
String/string_permutations
String/z_algorithm
Tree/balanced_tree_check
๐ŸŒณ Balanced Tree Checker
Tree/binary_tree_node
๐ŸŒณ Generic Binary Tree Node
Tree/bottom_top_view_binary_tree
๐ŸŒณ Bottom View and Top View of Binary Tree
Tree/boundary_traversal
๐ŸŒณ Boundary Traversal of Binary Tree
Tree/construct_tree_inorder_postorder
๐ŸŒณ Construct Binary Tree from Inorder and Postorder Traversal
Tree/construct_tree_inorder_preorder
๐ŸŒณ Construct Binary Tree from Inorder and Preorder Traversal
Tree/convert_sorted_array_to_bst
๐ŸŒณ Convert Sorted Array to Balanced BST
Tree/count_full_nodes
๐ŸŒณ Count Full Nodes in a Binary Tree
Tree/count_half_nodes
๐ŸŒณ Count Half Nodes in a Binary Tree
Tree/count_leaf_nodes
๐ŸŒณ Count Leaf Nodes in a Binary Tree
Tree/flatten_binary_tree_to_linked_list
๐ŸŒณ Flatten Binary Tree to Linked List (in-place, preorder)
Tree/invert_tree
๐ŸŒณ Tree Inverter (Mirror Tree)
Tree/level_order_traversal
๐ŸŒณ Level Order Traversal (BFS)
Tree/lowest_common_ancestor
๐ŸŒณ Lowest Common Ancestor (LCA)
Tree/lowest_common_ancestor_no_bst
๐ŸŒณ Lowest Common Ancestor in Binary Tree (not BST)
Tree/merkle_tree
๐ŸŒณ Merkle Tree Implementation for Blockchain and Distributed Systems
Tree/morris_traversal
๐ŸŒณ Morris Traversal (Inorder Traversal without Stack or Recursion)
Tree/path_sum_in_tree
๐ŸŒณ Path Sum in Binary Tree
๐ŸŒณ Print All Root-to-Leaf Paths in a Binary Tree
Tree/threaded_binary_tree_traversal
๐ŸŒณ Threaded Binary Tree Traversal
Tree/tree_depth
๐ŸŒณ Tree Depth/Height Calculator
Tree/tree_diameter
๐ŸŒณ Tree Diameter Calculator
Tree/tree_serialization
๐ŸŒณ Tree Serialization and Deserialization
Tree/tree_traversals
๐ŸŒณ Binary Tree Traversal Algorithms
Tree/validate_bst
๐ŸŒณ Binary Search Tree Validator
Tree/vertical_order_traversal
๐ŸŒณ Vertical Order Traversal of Binary Tree
Tree/zigzag_traversal
๐ŸŒณ Zigzag Level Order Traversal
wireless_p2p/aodv
Ad hoc On-Demand Distance Vector (AODV) - simulation-friendly core
wireless_p2p/chord
Chord DHT - practical production-minded implementation
wireless_p2p/dsr
Dynamic Source Routing (DSR) - simulation-level implementation
wireless_p2p/kademlia
Kademlia K-Bucket DHT - production-minded simulation implementation