Open in app

Sign In

Write

Sign In

Nick Ma
Nick Ma

44 Followers

Home

About

Jan 6, 2021

Robbing Houses with Dynamic Programming

Dynamic programming sounds fancier than it is. At its core, it is an optimization method. Let’s take a look at a problem from the foundations of the backtracking algorithms, we can brute force a working solution, then optimize it with dynamic programming. Starting with the house robber problem.

Programming

4 min read

Robbing Houses with Dynamic Programming
Robbing Houses with Dynamic Programming
Programming

4 min read


Mar 20, 2020

Lowest Common Ancestors and Variations

The lowest common ancestor (LCA) is the question where given two nodes and the root of the tree. Write a function to determine the first node that contains both nodes. Input: tree: node n1: node n2: node Output: ancestor_node: node Notes: both n1 and n2 are in the tree Assuming…

Algorithms

5 min read

Lowest Common Ancestors and Variations
Lowest Common Ancestors and Variations
Algorithms

5 min read


Nov 12, 2019

Combinations and Permutations with an Intro to Backtracking

Combinations and Permutations are a common set of interview problems that require generating various sequences based on rules. You can solve this problem with an iterative or recursive solution. I will work out the intuition behind both examples and discuss the pros and cons between them. The standard input output…

Programming

4 min read

Combinations and Permutations with an Intro to Backtracking
Combinations and Permutations with an Intro to Backtracking
Programming

4 min read

Nick Ma

Nick Ma

44 Followers

🤓 I like learning boring complicated stuff and making it sound easy. 💻 🤔

Following
  • Darius Foroux

    Darius Foroux

  • StartUp Health

    StartUp Health

  • Mission

    Mission

  • Srinivas Rao

    Srinivas Rao

  • Netflix Technology Blog

    Netflix Technology Blog

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech