Skip to content

Instantly share code, notes, and snippets.

View khanov's full-sized avatar
:shipit:
real artists ship

Salavat Khanov khanov

:shipit:
real artists ship
View GitHub Profile
@khanov
khanov / Binary Tree Printer.swift
Last active July 14, 2021 02:17
Binary Tree ASCII Printer
import Foundation
// Ideally Node should be a struct.
// However Swift doesn't allow recursive value types at the moment.
class Node {
var left, right: Node?
var value: String
init(value: String = "") {