JP Antunes

JP Antunes @jpantunes

Location:
Netherlands
Joined:
Jan 9, 2020

JP Antunes
articles - 17 total

Integer to Roman and back

I haven't posted in a while and now that my career took a U-turn back into the boardroom, I suppose i...

Learn More 6 1Jul 20 '20

Number of Ways to Paint N × 3 Grid - a short saga

Today's Leetcode problem was a bit of a wormhole but I feel like my notes and the process to find the...

Learn More 7 1Jun 6 '20

ransom note - updated

Given an arbitrary ransom note string and another string containing letters from all the magazines, w...

Learn More 1 0May 31 '20

Compress a string such that 'AAABCCDDDD' becomes 'A3B1C2D4'

This seems to be a popular interview question that I stumbled upon in an Anki deck const compress =...

Learn More 8 0May 25 '20

Idempotent vs Deterministic

Since I had to look it up more than once, here's a small reminder of the differences between the two...

Learn More 23 3May 12 '20

First Missing Positive

Given an unsorted integer array, find the smallest missing positive integer. Note: Your algorithm sho...

Learn More 1 0Apr 30 '20

Next Permutation

Today's Leetcode problem is quite interesting and, personally, I found the in-line array mutation tri...

Learn More 6 0Apr 29 '20

Add two numbers

Leetcode time again! This one actually took me a bit. The problem description states we should sum...

Learn More 7 0Apr 27 '20

Tiniest bubble sort on the net?

I stumbled on an older dev.to post by the great Greg Bullmash that I really liked because it triggere...

Learn More 13 4Apr 26 '20

It's Friday, let's break an Integer with math!

Leetcode's Integer Break problem popped up in my mailbox today just before I had my morning coffee....

Learn More 6 0Apr 24 '20

Valid Number

The valid number problem currently has the lowest acceptance rate of Leetcode at just 14.9%. That mus...

Learn More 6 0Apr 22 '20

Render to Caesar the things that are Caesar's

The /r/portugal sub-reddit can be a surprising little place. Today someone asked if the message in th...

Learn More 1 0Apr 19 '20

The largest number problem

Today I'm sharing a simple solution to the largest number problem on Leetcode. The problem statement...

Learn More 6 0Apr 17 '20

Trapping rainwater... to entertain the kids

Having two amazingly bright children is my greatest blessing, and this lockdown is giving me the oppo...

Learn More 6 1Apr 16 '20

12+ ways to Fibonacci

This morning I came across a great little paper showing twelve algorithms to compute Fibonacci number...

Learn More 4 2Mar 1 '20

Funding social impact for fun and profit

It turns out that we can do more today to combat climate change than ever before. With ElectraSeed Fu...

Learn More 4 0Feb 1 '20

JS warmup exercises... one-liner edition

There was a post I saw recently that promised a few minutes worth of entertainment... solving 30 java...

Learn More 8 4Jan 9 '20