Hash tables are one of those things that I definitely understand and can implement but I have always struggled at recognizing when to use them. If you have been following my blog for a while you have probably noticed that I could have used a Hash Table to solve a problem at least once. What…
Code Challenge: Add Border – In JavaScript
I have been doing a lot of CodeSignal challenges recently. If you have not used their platform yet, I highly encourage it. They have a more video-game type of layout and it really does put me more at ease than HackerRank. I do not know why but HackerRank intimidates me. I guess I have issues….
My Rants
Usually I will post about how I approach code challenges and how I solve them. While this is important to know, I think you should also be aware of the interview process and my struggles with it. I am excellent at the initial interviews. I am a sweet, dedicated and hardworking person and I know…
Code Challenge: Adjacent Elements Product — In C
Given an array of integers, find the pair of adjacent elements that has the largest product and return that product.ExampleFor inputArray = [3, 6, -2, -5, 7, 3], the output should beadjacentElementsProduct(inputArray) = 21.7 and 3 produce the largest product.Input/Output[execution time limit] 0.5 seconds (c)[input] array.integer inputArrayAn array of integers containing at least two elements.Guaranteed constraints:2 ≤ inputArray.length ≤ 10,-1000 ≤ inputArray[i] ≤ 1000.[output] integerThe largest product of adjacent elements. Understand We need to multiply all neighboring numbers and whichever gives us the largest number is the answer. Plan First things first, we need to multiply the number at the zero index by the number at the one index. That will be our initial “Max Value”. Then we need to loop through the array…
Code Challenge: Century From Year
This problem comes straight from Code Signal. Given a year, return the century it is in. The first century spans from the year 1 up to and including the year 100, the second – from the year 101 up to and including the year 200, etc. Example For year = 1905, the output should becenturyFromYear(year) =…
Code Challenge: Median of Two Sorted Arrays
Welcome to my second post on code challenges! Last post was all about how to approach a challenge. We discussed the UPER Problem Solving Framework. For those that are new, UPER stands for Understand, Plan, Execute and Reflect. Understand So for today’s code challenge we will be going over Median of Two Sorted Arrays. The…
Code Challenge: Add
This one is probably the “Hello World” of algorithms. Meaning, it’s the easiest. The spec asks us to write a function that returns the sum of two numbers. Okay so this seems like a simple Elementary problem. I did this in Python because Python is the best language. Go ahead and prove me wrong. I…
Job Searching
COVID-19 has caused stress in a lot of peoples lives. Many have been laid off and many are discouraged from job seeking. I am however, more motivated than ever. I just finished Lambda School and I’m ready to start coding for companies. My goal is to work in the health care part of tech since…