A quick cheat sheet / mini-quiz on Stacks & Queues to brush up on the fundamentals.

This blog post will be formatted with a question and then a corresponding answer. I find that having a question posed can help solidify my ability to recall information as well as force me to have a better understanding of the topic. See if it does the same for you.

As you go through the blog try to answer the questions in your own words before looking at the provided answer.

Stacks & Queues are both?

  • Linear Data structures → each allows you to traverse elements one by one…

If you’re working on a react-app with multiple pages, you’ll want to check out this neat package React Router.

React Router does what the name implies — it manages the routing for your react components.

In this article, we’ll go over how to set up the basic routing for your components drawing examples from a dance site that I’m working on.

Okay, let's get started!

First, install react-router.

Once the package is installed, go to your index.js file in the root of your src directory and import BrowserRouter as Router from “react-router-dom”.


In this article, I’ll be breaking down the sentenceReverse problem in a few different ways in Javascript. Then I’ll walk through my process of solving the problem and discuss its BigO.

Let’s begin!

Question

You are given an array of characters arr that consists of sequences of characters separated by space characters. Each space-delimited sequence of characters defines a word.

Implement a function reverseWords that reverses the order of the words in the array in the most efficient manner.

Example:

input:  arr = [ 'p', 'e', 'r', 'f', 'e', 'c', 't', '  ',
'm', 'a', 'k', 'e', 's', ' ',
'p', 'r', 'a', 'c', 't', 'i', 'c', 'e' ]
output: [ 'p', 'r', 'a', 'c', 't', 'i', 'c', 'e', ' ',
'm', 'a', 'k', 'e', 's', ' ',
'p', 'e', 'r', 'f', 'e', 'c', 't' ]

Constraints:

  • [time limit] 5000ms
  • [input] array.character arr → 0 ≤…

In this article, I’ll be breaking down the moveZerosToEnd problem in a few different ways in Javascript. I’ll walk through my process of solving the problem and discuss its BigO.

Let’s begin!

Question

Given a static-sized array of integers arr, move all zeroes in the array to the end of the array. You should preserve the relative order of items in the array.

We should implement a solution that is more efficient than a naive brute force.

Examples:

input:  arr = [1, 10, 0, 2, 8, 3, 0, 0, 6, 4, 0, 5, 7, 0]
output: [1, 10, 2, 8, 3, 6, 4, 5, 7, 0, 0, 0, 0, 0]

Constraints:

  • [time limit] 5000ms
  • [input] array.integer arr → 0 ≤ arr.length ≤ 20
  • [output] array.integer

Let's analyze the problem. What we’re doing is pretty simple in concept, if there is a zero value before a…


What is Firebase?

Firebase is a BaaS (backend as a service) platform developed by Google for creating web and mobile applications. It provides developers a number of tools and services to help develop quality apps and scale over time as their user base increases.

Some notable features Firebase provides:

  • Authentication — Firebase Authentication can be used to manually integrate one or more sign-in methods into an app.
  • Realtime database — data is synced across all clients in real time and remains available even when an app goes offline.
  • Hosting — Firebase provides fast hosting for a web app.
  • Analytics — allows you to…


In this article, I’ll be breaking down the rootOfNumber problem in Javascript. I’ll walk through my process of solving the problem and discuss its BigO.

Let’s begin!

Question:

Implement a function root that calculates the n’th root of a number. The function takes a nonnegative number x and a positive integer n, and returns the positive n’th root of x within an error of 0.001 (i.e. suppose the real root is y, then the error is: |y-root(x,n)| and must satisfy |y-root(x,n)| < 0.001).

Examples:

  • input: x = 7, n = 3 → output: 1.913
  • input: x = 9, n = 2 → output: 3

Constraints:

  • [time limit] 5000ms
  • [input] float x → 0 ≤ x
  • [input] integer n → 0 < n
  • [output] float

Let’s analyze and restate the problem in our own words.

We’re being asked to write a function that determines the n’th root of a number. So what does that mean? …


A quick cheat sheet / mini-quiz on LinkedLists to brush up on the fundamentals.

This blog post will be formatted with a question and then a corresponding answer. I find that having a question posed can help solidify my ability to recall information as well as force me to have a better understanding of the topic. See if it does the same for you.

As you go through the blog try to answer the questions in your own words before looking at the provided answer.

What is a Linked List?

  • A linear data structure with composed of ‘nodes’ that are linked with pointers. They are…

A quick cheat sheet / mini-quiz on HashTables to brush up on the fundamentals.

This blog post will be formatted with a question and then a corresponding answer. I find that having a question posed can help solidify my ability to recall information as well as force me to have a better understanding of the topic. See if it does the same for you.

As you go through the blog try to answer the questions in your own words before looking at the provided answer.

What are some of the other names for a Hash Table?

  • Hash Maps
  • Maps
  • Unordered Maps
  • Dictionaries
  • Objects

*depending on the language there will be slight…


A quick cheat sheet / mini-quiz on Arrays to brush up on the fundamentals.

This blog post will be formatted with a question and then a corresponding answer. I find that having a question posed can help solidify my ability to recall information as well as force me to have a better understanding of the topic. See if it does the same for you.

As you go through the blog try to answer the questions in your own words before looking at the provided answer.

Describe an Array in as many ways as possible.

  • A collection of items of the same data type(typically).
  • Can be multiple dimensions.
  • Can be…


If you’ve been using Redux, or have used it before, but don’t know much about Facebook’s Flux Pattern. Don’t worry about it, you’ll get it in no time.

Here’s the jist.

Flux can be seen as a precursor to Redux. It was created as an alternative to the Model-View-Controller (MVC) pattern due to the number of bugs that arose as applications scaled and became increasingly more complicated.

Furthermore, due to the bi-directional nature of MVC, it makes tracking the source of bugs a big pain, as well lead to instability of the overall architecture.

Janu Sung

Just another one of those dreamers with a sparkle in his eyes.

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