This post will provide a series of questions on scaling an application with each question building off the one before it. This set builds of Pt: 1, so take a look at those questions before you try these ones.
This section will look at what happens when we scale globally.
The users abroad are too far away from the server it needs to connect to and therefore has to go through several hops to establish a connection to retrieve data.
Provide caching on the client side and on the server side to speed up our requests…
This post will provide a series of questions on scaling an application with each question building off the one before it. Try to answer the questions first and then see how your answers compare!
Restart the server.
You routinely backup your db to a cloud service like AWS S3.
Keep the backup db on a different server. If it were on the same server it would also be cleared and it would defeat the purpose.
Also, routinely verify the backups to make sure they are restorable. …
Sometimes it's good to study in order to learn how something works. Other times, it's better to just build the thing and learn what needs to be done in order to make it work.
If you’d like to learn more about HashTables, check out my blog here that goes into them.
But for those of you who have read that post (or don’t need to) let's get straight to it.
Hash Maps, Maps, Dictionaries, Objects, they’re all different ways of describing a hashTable. There may be differences…
Given two sorted arrays
arr2 of passport numbers, implement a function
findDuplicates that returns an array of all passport numbers that are both in
arr2. Note that the output array should be sorted in ascending order.
M be the lengths of
arr2, respectively. Solve for two cases and analyze the time & space complexities of your solutions:
M ≈ N - the array…
flip(arr, k)that reverses the order of the first
kelements in the array
pancakeSort(arr)that sorts and returns the input array. You are allowed to use only the function
flipyou wrote in the first step in order to make changes in the array.
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.
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”.
arrthat consists of sequences of characters separated by space characters. Each space-delimited sequence of characters defines a word.
reverseWordsthat reverses the order of the words in the array in the most efficient manner.
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' ]
arr→ 0 ≤…
arr, move all zeroes in the array to the end of the array. You should preserve the relative order of items in the array.
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]
arr→ 0 ≤ arr.length ≤ 20
Let's analyze the problem. What we’re doing is pretty simple in concept, if there is a zero value before a…
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: