Hello, world! (=^・ω・^=)

by Serowo 1 min read

This is a placeholder post so the blog isn't empty. Edit or delete it once you're logged in as the admin (the first account registered).

What I'll post here

Mostly notes on whatever I'm studying, plus write-ups of projects when I finish one. Some of it will be wrong. Tell me in the comments if so.

Markdown test

Code blocks are highlighted:

def binary_search(items, target):
    lo, hi = 0, len(items) - 1
    while lo <= hi:
        mid = (lo + hi) // 2
        if items[mid] == target:
            return mid
        if items[mid] < target:
            lo = mid + 1
        else:
            hi = mid - 1
    return -1

And tables:

Structure Lookup Insert
Array O(1) O(n)
Hash map O(1) O(1)
Binary tree O(log n) O(log n)

Comments (0)

No comments yet.