Founder to CEO

A nice 99-page doc for anyone out there who may want to be a CEO someday. https://docs.google.com/document/d/1ZJZbv4J6FZ8Dnb0JuMhJxTnwl-dwqx5xl0s65DE3wO8/preview#

July 3, 2018 · 1 min · birdchan

Inorder Tree Traversal - Morris Traversal

[code] # Python program to do inorder traversal without recursion and # without stack Morris inOrder Traversal # A binary tree node class Node: Constructor to create a new node def __init__(self, data): self.data = data self.left = None self.right = None # Iterative function for inorder tree traversal def MorrisTraversal(root): ...

July 1, 2018 · 1 min · birdchan

Data structures reference

https://www.interviewcake.com/data-structures-reference

July 1, 2018 · 1 min · birdchan

Find the max possible sum from all contiguous subarrays of a given array

Given an array of integers, find the maximum possible sum you can get from one of its contiguous subarrays. The subarray from which this sum comes must contain at least 1 element. For inputArray = [-2, 2, 5, -11, 6], the output should be arrayMaxConsecutiveSum2(inputArray) = 7. The contiguous subarray that gives the maximum possible sum is [2, 5], with a sum of 7. Guaranteed constraints: 3 ≤ inputArray.length ≤ 105, -1000 ≤ inputArray[i] ≤ 1000. ...

June 29, 2018 · 2 min · birdchan

List of unicorn startup companies

https://en.wikipedia.org/wiki/List_of_unicorn_startup_companies I wasn’t aware of that many unicorn startups from china. Turns out there are quite a lot.

June 27, 2018 · 1 min · birdchan

Light bulb colors

June 26, 2018 · 0 min · birdchan

Convert a bare timestamp to local time in PostgreSQL

Very often in old databases a timestamp column does not have the timezone info. This becomes an issue when the business gets bigger and crosses different timezones. [code] select bare_timestamp_field at time zone ‘Asia/Shanghai’ at time zone ‘US/Pacific’ from some_table; [/code] The above sample query assigns the Shanghai timezone to the bare timestamp, then convert the resulting timestamp w/ timezone to the US Pacific PST timestamp. The double ‘at time zone’ parts can be read as: from timezone #1 to timezone #2. This is due to the implicit syntax. A more explicit syntax is the following, which makes more sense similar to type casting. ...

June 25, 2018 · 1 min · birdchan

Big History Project

Nice course with short videos that explains the history of our universe through many fields of study. https://www.bighistoryproject.com/home

June 23, 2018 · 1 min · birdchan

Web 2.0 vs Web 3.0 Comparison Map

ref: https://medium.com/@matteozago/why-the-net-giants-are-worried-about-the-web-3-0-44b2d3620da5

June 2, 2018 · 1 min · birdchan

Dealing with time

Good read about time in general in programming. https://zachholman.com/talk/utc-is-enough-for-everyone-right

May 31, 2018 · 1 min · birdchan