This is an easy question in Leetcode. We will be using Breadth-First Traversal to solve this problem.

(Disclaimer: code will be written in Javascript.)

Hello there! In this article, we are going to walk through the question of “Minimum Depth of Binary Tree”. This question is not as popular as medium level questions, like “Binary Tree Level Order Traversal”. BUT! this question is a good way to get introduced to one of the common topics: traversing a binary tree with Breadth-First Search (BFS) (Note: I am aware that this is not the most optimized solution. Recursion has faster time complexity, compared to using BFS).

5 ReactJS Interview Questions


As of April, I am approaching to the 6-month mark since I’ve first learned ReactJS. I am currently preparing for any possible ReactJS interview questions and realized there are a lot I don’t know! I thought this would be a fun way for both you and I to learn React through some fun quizzes. Let’s get to it!


Q1. What is Reconciliation?

A. The process through which React deletes the DOM.

B. The process through which React updates and deletes the component.

C. It is a process to set the state.

D. The process through which React updates the DOM.

A 3-step guide to understand the importance of “key” prop


For those who have written React code before, I am sure you have encountered this infamous warning:

This is a medium level coding question in Leetcode. We will be using the “Sliding Window” pattern to solve this question.

(Disclaimer: The code will be written and explained in JavaScript. I am no artist, so I don’t know the best tool to draw on computer and I will post my hand-drawn graphs in this article.)

Table of Contents:


Longest Substring Without Repeating Characters

Given a string s, find the length of the longest substring without repeating characters.

Example 1:

Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.

Example 2:

Input: s = "bbbbb" Output: 1 Explanation: The answer is "b", with…

Substring & Substr

If you haven’t checked out Part 1 where we discussed about slice() and splice(), click here!

Substring. Substr. Like seriously? What’s the deal? The latter word spells without the “-ing.” Did JS creators not like the gerund? I was very confused. As I read more, I finally understood the difference and I decided to write this article to break down the differences between the two. We would also compare to slice() (which we discussed in Part 1 — Yes, I am self promoting lol).

Table of Contents

Syntax for Substring & Substr

substring() and substr() are used when you would like…

Slice & Splice (Examples With TV Characters)

Array and string are the most basic things you would find in tech interview (especially for entry level). I have encountered a few of array-and-string-related questions in online assessments. The most common way of dealing these questions is using either slice, splice, substr or substring . I chose this topic for this article is because I constantly found myself in a position that I still have to Google all these methods one by one until I figure out how to use them. If you are reading this article, I’m sure you are probably in my position as well.

This article…

10 Fundamental HTML5 Questions You May or May Not Know!


Studying is not easy. It is already not easy to study (and GRADUATE!) from college, but studying for a tech interview… it’s like that determines your future and your ultimate opportunity to work for the company… Just kidding, don’t let that ruin your confidence, you always learn from the mistakes and that’s how we grow. Anyways, I was studying some frontend questions. I have learned HTML5 for quite a while, but most of the time I still have to Google for the particular code. I came across some study guide some time ago and I was surprised how much I…

Linked List, one of the topics of common data structure questions in tech interviews. I will take you guys to explore the concepts of stack and queues with linked list!

(Disclaimer: Prior Knowledge to Linked List is required for this article and the codes will be written in Javascript.)

I spent my last two weeks learning linked lists. I’ve gotta say after struggling with sorting algorithms (those bubble, insertion, merge, just — aaaahh), I found linked lists is so much easier to grasp. I will go back to sorting algorithms eventually. At this moment, I am living in the bubble of linked list (hats off to sorting algorithms🎩).

Table of Contents:


What’s the difference between null and undefined? We are going to find out in this article. (Bonus section with the new feature of ES2021)

I have learned Javascript for several months, but I still could not differentiate null and undefined. This may sound silly, I know. So, in this article, I decided to dive deep the differences between the two.

Before we start, we have to understand the 7 primitive data types:

  • string
  • number
  • bigint
  • boolean
  • undefined
  • null
  • symbol

And there are 6 common known falsy values in Javascript(full list), which are:

  • keyword false
  • number 0 and -0 (Also 0n and -0n )
  • Empty string values: “”, '' , ``
  • null (the absence of any value)
  • undefined
  • NaN — not a number

As we…

Deploying website can be quite annoying, especially if you’re a first timer. Here’s a guide to walk you through the process.

I successfully deployed my website for the first time a month ago, but it took me a whole week to figure out, as I encountered a lot of problems along the way. I would walk through all the steps depends on your need. I will also provide a content page, so you can guide yourself to respective guide.

Table of Content

Preparation before Deploying to Heroku

Before we start:

  • Please make sure your frontend and backend folders are in different repositories (at least for the purpose…

Megan Lo

Full Stack Web Developer. Flatiron School + Recent College Graduate in Sociology. Snoopy. Iced Vanilla Latte. Sitcoms. Wannabe Solo Traveler. Avid Googler.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store