Skip to content

Instantly share code, notes, and snippets.

View SimonCqk's full-sized avatar
🎯
Focusing

Simon_CQK SimonCqk

🎯
Focusing
View GitHub Profile
@SimonCqk
SimonCqk / BPlusTree.py
Last active February 8, 2018 06:52
A B Plus Tree implementation of pure python 3.
"""
This file include the concrete implementation of B+ tree.
"""
import bisect
import math
import operator
from abc import abstractmethod, ABCMeta
from typing import Iterable
@SimonCqk
SimonCqk / ConcurrentQueue.hpp
Last active January 19, 2018 12:49
A lock-free concurrent queue implementation of C++.
#ifndef _CONCURRENT_QUEUE_IMPL_HPP
#define _CONCURRENT_QUEUE_IMPL_HPP
#include<iostream>
#include<array>
#include<chrono>
#include<thread>
#include<atomic>
#include<condition_variable>
#include<mutex>
@SimonCqk
SimonCqk / btree.py
Last active March 22, 2023 05:47 — forked from teepark/btree.py
a pure-python B tree and B+ tree implementation
import bisect
import itertools
import operator
class _BNode(object):
__slots__ = ["tree", "contents", "children"]
def __init__(self, tree, contents=None, children=None):
self.tree = tree