This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bisect | |
import itertools | |
import operator | |
class _BNode(object): | |
__slots__ = ["tree", "contents", "children"] | |
def __init__(self, tree, contents=None, children=None): | |
self.tree = tree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This file include the concrete implementation of B+ tree. | |
""" | |
import bisect | |
import math | |
import operator | |
from abc import abstractmethod, ABCMeta | |
from typing import Iterable |