Map [1]
| Operation | Time Complexity |
|---|---|
| Access | O(log n) |
| Search | O(log n) |
| Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
| Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import argparse | |
| import logging | |
| import math | |
| import os | |
| import statistics | |
| import signal | |
| import sys |
| version: "3" | |
| networks: | |
| kong-net: | |
| driver: bridge | |
| services: | |
| ####################################### | |
| # Postgres: The database used by Kong |
| import { SVGDrawFunction } from "@tisoap/react-flow-smart-edge/src/functions/drawSvgPath"; | |
| import { XYPosition } from "reactflow"; | |
| const distance = (a: XYPosition, b: XYPosition) => Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2)); | |
| function getBend(a: XYPosition, b: XYPosition, c: XYPosition, size: number): string { | |
| const bendSize = Math.min(distance(a, b) / 2, distance(b, c) / 2, size); | |
| const { x, y } = b; | |
| // no bend |