Posts

Ecto Associations I: …

Motivation

One thing that might not be intuitive at first is that associations work on the whole collection of data. You’ll see this mentioned in a few ways in the docs. They’ll usually say that methods like cast_assoc and put_assoc work with the full data or the work with the …

Why Keyword List

Intro

As an Elixir beginner Keyword Lists are one of the weird features of the language. Coming from other languages, you’d almost always think of map-like structure first. So there’s a gnawing feeling, why keyword list? We’ll start with the unique characteristics of keyword list …

Directional Dependence

Intro

While going over the Flatland Space Station problem it made me stumble to a pattern I have noticed before and wanted to talk more about it. In this problem you run into a situation where the decision you want to make is dependent on two choices. Intuitively these decisions are not hard but …

Power Set

Introduction

In this case we want to try all possible variations of the given array. To be more specific we want to try all possible combinations of all possible lengths. What we’re describing here is the power set.

There’s a great article that elaborates even further on this however I …

Non Divisible Subset I

Introduction

Hackkerank medium problems continue to be a challenge for me. In this problem that we’ll take a look at it was challenging due to the fact that the brute force method seemed fairly involved and the inability to make connections to solve this problem in a faster way. In this post …

Flip Matrix Brute Force

Introduction

Warning: Code may not be 100% compilable but it should be close. I was making changes along the way so although at one point it passed the test cases it might not now.

In our previous posts we learned how to reverse rows and columns which we can use to solve Flip Matrix in a brute …