Welcome to the fourth episode of Algorithm Spotlight! The featured algorithm for this week is 🥁…drum roll, please…🥁 — Binary Search!
Right before we begin, if you missed out on the previous episode, here’s Kadane’s Algorithm:
We are playing the number guessing game! I am thinking of a number that is between 0–100. If my number is 23, how can you guess my number quickly and efficiently? Welcome to the world of Binary Search.
One of the most frequent daily tasks is searching through a phone book, a book from a bookshelf, etc. Luckily, in computer science, we have plenty…
Welcome back to the third episode of Algorithm Spotlight! In this episode, I’ll be talking about Kadane’s Algorithm!
Right before we begin, if you missed out on the previous episode, here’s Floyd’s Cycle Detection Algorithm:
Given an integer array
nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.
Input: nums = [-2,1,-3,4,-1,2,1,-5,4]
Explanation: [4,-1,2,1] has the largest subarray sum = 6.
Input: nums = [-2147483647]
Right before we jump into solving this popular Maximum subarray problem, we need to understand the problem…
Welcome to the second week of Algorithm Spotlight! This week our featured algorithm is…drum roll please…Floyd’s Cycle Detection Algorithm!
Right before we begin, if you missed out on the previous episode, here’s the Euclidean Algorithm article:
Given a linked list, determine if it has a cycle in it.
To represent a cycle in the given linked list, we use an integer
pos which represents the position (0-indexed) in the linked list where the tail connects to. If
pos == -1, then there is no cycle in the linked list.
Want to read this story later? Save it in Journal.
The Euclidean algorithm is an algorithm for quickly finding the GCD (greatest common divisor) of two numbers and is an extremely important number theory concept. The GCD is used in many applications, like simplifying fractions, modular arithmetic, and also encryption algorithms such as the RSA Encryption Algorithm.
The GCD is the greatest divisor that divides two numbers. For example, the gcd(21, 28) is 7, as we first list out all the factors (a number that is a divisor of a bigger number, e.g. 2 is a factor of 20):
Factors of 21: 1, 3, 7, 21
Factors of 28: 1…
There’s a very high chance that you’ve taken a Udacity course, and maybe even a nanodegree. But since Udacity believes in a “project-based, active learning” philosophy, you’re very likely to not pass Udacity projects on the first submission, or maybe the second submission. In this Medium blog post, I’ll share my tips on how to pass Udacity projects. Let’s get started!
For every project on Udacity, there are project rubrics. Make sure you check out Udacity’s project rubrics and compare it with your work. You can find my article on how to find Udacity’s Project Rubrics here.
When working on…
This is the first part of the 2 part series by Aaron Ma on the summary of Hands-On ML.
So you may have come across the image on the left: Hands-on ML with Scikit-Learn, Keras & TensorFlow by Aurelien Geron. I’ve just finished reading his book, and I’ve decided to create a neat little summary of his book.
This book is divided into 2 sections. This is the 1st section’s summary. You can find the 2nd section’s summary here. The 1st section covers the following:
Hello world, it’s Aaron! Today I’ll be talking about TensorFlow 2’s amazing tf.tpu API.
NOTE: The version of TensorFlow I’m using is TensorFlow 2.1. The Python version I’m using is 3.7. I’ll also periodically update the TensorFlow & Python version used here to match the most recent releases.
TensorFlow is Google’s machine learning library that is free and open-source for anyone to use. It’s written in C++ so it executes low-level, or it executes ridiculously fast.
Well, a TPU is a Tensor Processing Unit that was developed by Google Cloud. It’s a scary machine cooled by water(see picture depicted below).
A few days ago, I received Brilliant from a friend. I practiced solving some problems on Brilliant with the Premium subscription, and I loved it! Here’s my recap & review of Brilliant Premium. Finish reading this to get a discount on Brilliant Premium!
Brilliant is a site that follows the freemium business model, which means, yes, you do have to pay if you want to get the value of Brilliant. Students, professionals, and life-long learners can learn about high school math and beyond at the level of the university style. You can also learn physics and computer science(like Machine Learning)…
Hello, world, it’s Aaron! In this blog, I’ll be talking about an in-place algorithm, which modifies data structures or objects outside of its stack frame. An out-of-place function does not make any changes that are visible to other functions. Usually, these functions copy data structures or objects before it manipulates or changes them. Let’s take a look into this with some examples.
Thanks for reading and have a great day!