Sign in


Listed as easy, description:

Given the array candies and the integer extraCandies, where candies[i] represents the number of candies that the ith kid has.

For each kid check if there is a way to distribute extraCandiesamong the kids such that he or she can have the greatestnumber of candies among…


Listed as easy, description:

Given an array nums. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i]).

Return the running sum of nums.

Example 1:

Input: nums = [1,2,3,4]
Output: [1,3,6,10]
Explanation: Running sum is obtained as follows: [1, 1+2, 1+2+3, 1+2+3+4].

Example 2:

Input: nums =…

Entry level positions, hiring practices, and so on and oh my! My take.

Table of Content


How do you write about something on a subject as big as the title might suggest? You might start with a quote: “I have a degree but I can’t find a job.”

Most of the times, new graduates face this struggle…

I couldn’t think of a funny title so I went with what you see now. “Fun Time With INT 0x80” sounded off. Anyway.. I just wanted to share my experience.

I learned a lot and I want to thank the following for the experience: Robin (Captain), potkettleracism, theorycrafter, jy200, banksy…



Balanced strings are those who have equal quantity of ‘L’ and ‘R’ characters.

Given a balanced string s split it in the maximum amount of balanced strings.

Return the maximum amount of splitted balanced strings.

Example 1:

Input: s = "RLRRLLRLRL"
Output: 4
Explanation: s can be split into "RL", "RRLL"…

@pry0cc asked in Discord if anybody wanted write up something about remediation. I volunteered with @Cryoplex. The last time I did a CTF was in college so I’m rusty.

The Attack

Anyway, let’s get straight to it. You can find the exercise here. As noted, there are multiple ways to solve this…



Given an array arr, replace every element in that array with the greatest element among the elements to its right, and replace the last element with -1.

After doing so, return the array.

Example 1:

Input: arr = [17,18,5,4,6,1]
Output: [18,6,6,6,1,-1]


  • 1 <= arr.length <= 10^4
  • 1 <=…


We all love checklists. Who doesn’t? It’s simple and helps us keep track of where we are. Anyway, this is a really ambitious mini project to try to cover every aspect of our life.

It’s ambitious because there is way too much to write. I will only cover the physical…



We are given a list nums of integers representing a list compressed with run-length encoding.

Consider each adjacent pair of elements [freq, val] = [nums[2*i], nums[2*i+1]] (with i >= 0). For each such pair, there are freq elements with value val concatenated in a sublist. …


Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, otherwise, you have to subtract 1 from it.

Example 1:

Input: num = 14
Output: 6
Step 1) 14 is even; divide by…


I write just in case death knocks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store