Problem We have another array operations question. This time we are given two inputs, a number n and a 2d array of operations. Each of the operations has 3 values, a start index, an end index and an increment value. Source: HackerRank The task is to implement each of those tasks on to a new […]
Problem Codility MaxCounters We are given a number n and an array A of length m where each value in A is less than n+1 and greater than or equal to 1. We have to create a function that executes two operations using a new array of length n with initial values 0. The array […]
When I started programming I developed a particular code style. This style was defined by how I structure my code, how I name things etc and was heavily influenced by the senior developers I worked with. Over the years I developed my own personal style which was evolved with every project I did and every […]
Problem Source: Codility Given an array A of length n filled with integers find the smallest missing positive number. Example: [4,8,1,3,2] => 5 [1,2] =>3 Restrictions n ranges from 1 .. 100,000 Values of A range from -1,000,000 to 1,000,000 My Solution As usual, I decided to first take a brute force approach. As a […]
Long Factorials Calculating the factorials is one of the most basic algorithms out there. It’s so basic it’s actually used to teach a harder concept, recursion. I’m explaining this so that I can get away with using the 2-minute explanation of both concepts. Let me know if you’d be interested in a deeper dive. Recursion […]
The problem: We are doing a permutation check. Given a list A with n elements and the task is to determine if A is a permutation of natural numbers from 1 to n. For example [4,2,3,1] is a permutation since all element of the list are in the list [1..n] where n=4. [4,1,2] is not […]
I keep all of my passwords in a password manager. My password manager of choice is Keepass. I used because it’s open-source, free and doesn’t require me to be locked into a cloud-based server. If I require syncing across devices then I can use Google Drive or iCloud services I’m already using. This means the […]
Remote work is here. Developers have known for ages that all you need to work is a laptop and internet, now thanks to COVID everyone else does too. I’ve worked remotely for the better part of three years now, starting back in 2017 when I was doing consulting in the UAE. I went there physically […]
I was having a chat with a friend of mine when the issue of how secure blockchain really was came up. Basically the question was: Is it possible to hack blockchain? Short answer: Yes.Long answer: Yes, but it’s complicated. While the concept itself is pretty resilient to hacking, blockchain, like all other software suffers from […]
So a few weeks ago I started a project to install Jenkins and set up CI/CD on my projects. Well just after I started that project I had a series of big life changes that put that on hold for a few weeks. I left my old job and have been reorganising my life, getting […]