Leetcode 1480. Running Sum of 1d Array

This week the algorithm I’ll be focusing on has to do with creating a sum of numbers as they stack up on top of each other in a given array. What do I mean? Well think of it this way:

Here’s our sample array. We’ll call it nums: nums = [1,2,3,4]

We want to get our algorithm’s output to be [1,3,6,10].

What’s happening is that for every number listed, the number(s) before it is being added up to the current number, except of course the first one which stays the same. For instance, 1+2+3 would give us 6. …

Hope everyone has had a productive first week of this brand new year. I myself have gotten many things checked off my to do list this week including spending more time on Leetcode. This time I’ll explain a more simple problem than last week’s problem which I feel could be valuable to read and understand in a short blog post such as this one to save you time. I will be solving this problem in JavaScript. Let’s dig in.

The Problem

Given an array nums and a value val, remove all instances of that value in-place and return the new length.


Binary Search — Chopping things in half over and over again

For the first week in this new year, one of the most relevant algorithms I’ve been working on is the binary search algorithm. Binary search is such a useful type of algorithm since it efficiently makes things easier to find and is not too complicated to understand. Looked at in another way, it’s sort of like chopping a log over and over again in half until you reach the point you’d like to be at in the chopping. Specifically in the case of binary search, that desired point would be at the point of our target number.

What is binary search anyways?

Binary search means…

Hope everyone has had a happy holiday so far during this festive season! This week I’ve focused on longer algorithm challenge questions which focus on creating then calling helper methods to practice better habits at organizing my code while applying more logic on how to manipulate arrays. One of the algorithms I’ve solved for this week is the question that asks for the top three greatest numbers without sorting the array from least to greatest.

The trick with this question is to think in steps on how to solve it and then then knowing how to designate ultimate goals for…

Some silly palindromes

I have had a few technical interviews lately asking questions that are variations or actually include the palindrome question. This is why I thought it would be relevant to shed some light on how I learned to solve this interview question in the hopes that someone could benefit from how to solve it by reading how I did it.

As far as I know there are 4 ways of solving this question, but when I refer to the best or worst way I am referring to best and worst big-O notation in both time and space complexity. …

Keep reading to find out how this Ferrari applies to Big-O!

Algorithm challenges and I have been best friends lately. I say that not to brag, or to say I’m an expert quite yet, but just to say that I have a better understanding of them than I did last week. Looking back on my knowledge comparison, I have concluded as long as a developer steadily grows in any way they can, since the tech industry constantly brings new changes, then they are on the right track to keep themselves valuable to their teams or job marketplace if they are looking for a new role.

Besides shedding some light on this…

As one of the most innovative and liked JavaScript frameworks, React is constantly changing to implement updates that are easier for developers to optimize their code. As of February 6, 2019 through version 16.8.0, React introduced hooks through releasing this update, which is what I’m going to be covering today.

To start off and to simplify things, the main idea of hooks is to create a way to use state and other React features without writing a class. …

Custom Word Art I created online- to make yours click here

Like the way love and money make the world go round, algorithms are what makes the technical job interview go round, along with a sprinkle of data structure fundamentals of course. Understanding these two topics and knowing how to solve them quick is what lays out a firm foundation for any programmer to grasp the skill of how to write efficient code better.

Why is this true? There are many answers to why solving algorithms makes you a better developer, but the simplest way I’d like to address this is by stating a truth. The truth is algorithm is just…

My example of what is shown after adding and pushing some code from my text editor

As I am now about two months into my job search, I have been in the process of working on my portfolio website and am almost ready to feature it on my online accounts, LinkedIn profile, or basically anywhere where anyone can see it. Through working on this site, I have gained more insight on how to host websites using GitHub Pages, Heroku, and Netlify.

A great portfolio website is sort of like a visual well-written resume. A site that serves this purpose well should be appealing to the eyes of hiring managers, coworkers, technical recruiters, as it makes for…

Originally Posted on October 7, 2020

I am ever so close to official graduation from Flatiron after adding some new features on my snakes and ladders board game project. I thought a series of truths from completing this bootcamp would be an appropriate entry to add to my blog to sum things up. My experience at Flatiron School has really taught me just how capable I am at learning how to code, and how to code well, but it also taught me how to think at anything I do, with trial and error being my best teacher.

I would say…

Irene Scott

Irene Scott has a passion for coding/learning new things. When she is not coding, she enjoys the Florida sunshine, going to the dog beach, and orange picking.

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