William Pei Yuan·Aug 13, 2023Binary Tree Vertical Order TraversalGiven the root of a binary tree, return the vertical order traversal of its nodes' values. (i.e., from top to bottom, column by column).
William Pei Yuan·Aug 5, 2023Create a Binary Search TreeThis code takes an array that represents a binary tree in level-order traversal (root node at the beginning (index 0), then level by level…
William Pei Yuan·Aug 5, 2023Validate Binary Search TreeGiven the root of a binary tree, we are to determine if it is a valid binary search tree (BST). A valid BST follows these properties:
William Pei Yuan·Aug 4, 2023Container With Most WaterGiven an array where each element represents the height of a vertical line on a chart. The goal is to find two lines, which together with…
William Pei Yuan·Aug 4, 2023Best Time to Buy and Sell StockSay you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one…
InPowermoves never die, it evolvesbyWilliam Pei Yuan·Feb 3, 2020An iterative guide to training powermoves for longevity: Part 1 — Airflares introTraining, maintaining, conditioning and/or rehabilitating your airflares for longevity. Part 1 is the setup of the g-force airflare…
InPowermoves never die, it evolvesbyWilliam Pei Yuan·Jan 27, 2020An iterative guide to training powermoves for longevity: Part 1 — Flares introTraining, maintaining, conditioning and/or rehabilitating your flares for longevity. Part 1 is the setup of the g-force flare machine and…
InPowermoves never die, it evolvesbyWilliam Pei Yuan·Jan 27, 2020An iterative guide to training powermoves for longevity — Intro & faqs.Introduction & FAQs with the gravity force training machines. (*The guides are combinations of paraphrased g-force manual information…A response icon1A response icon1
William Pei Yuan·Aug 13, 2019The JavaScript map() w/in ReactJS — a simple example.I have written a code sandbox (https://codesandbox.io/) example of using the all-powerful JavaScript map function with ReactJS (CRA —…A response icon2A response icon2