Summoning binary

All things related to Algorithms

article

Minimum Waiting Time: A Greedy Algorithm Explained with Candy

Clarice Bouwer
Clarice Bouwer
Monday, 16 December 2024 · Estimated 3 minute read

Unhealthy life choices aside, let's imagine that you're a small kid standing in a candy store 🍬 and the candy is stacked wall to wall 🤤 ranging from different types of chocolates, hard candies, soft …

#133
GPT-4oGPT-4o
article

Prefix Sum Array - An Epic Tale of Accumulation

Clarice Bouwer
Clarice Bouwer
Sunday, 10 November 2024 · Estimated 8 minute read

TL;DR: By using a Prefix Sum Array, you can efficiently calculate the sum of any sub-array in constant time after an initial linear-time setup. It's a simple yet powerful technique that can optimize …

article

Interview question - The sorted square array algorithm

Clarice Bouwer
Clarice Bouwer
Monday, 5 August 2024 · Estimated 5 minute read

I was tasked to write an O(n) time and O(n) space complexity - where n is the length of the given input array - algorithm to solve the following problem: You are given a few non-empty arrays of integ…