Tree Basics and some Swift helpers for leetcode

I do leetcoding every once a while, but keep forgetting some tree basics. This post here it to help with that. Types of Tree Trees can have multiple children. Or on the special case of binary trees have only two. A binary tree is still different from a binary search tree (BST) where things follow a certain order. Binary search tree For a Binary tree to be a BST, it has to follow the following rules:...

September 11, 2023 ยท 8 min

How Understanding State Machines Helps With Building Trees and Graphs

My team was dealing with a large flow, where user can transition from multiple states or sometimes skip certain states. We didnโ€™t have a centralized controller, every screen just had logic on where it should go next. This made it difficult for us to see all our logic at once. We asked around and was told state machines are a good fit for our situation. State machines are void of any UX....

October 6, 2022 ยท 7 min