Notes · Working journal

Things I've learned writing them down.

Reading notes, post-mortems, and quick reference — written for the next time I need them.

201816 notes
Oct 20

claude-instructions

Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)

2 min
Oct 20

Best Time to Buy and Sell Stock

You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy…

1 min
Oct 20

Check if the Array Is Sorted and Rotated

Given an array nums, return true if the array was originally sorted in non-decreasing order, then rotated some number of positions (including zero). Otherwis…

1 min
Oct 20

Max Consecutive Ones

Given a binary array nums, return the maximum number of consecutive 1's in the array.

1 min
Oct 20

Merge Sorted Array

You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and…

2 min
Oct 20

Pascal's Triangle

Given an integer numRows, return the first numRows of Pascal's triangle.

1 min
Oct 20

Two Sum & Three Sum

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

4 min
Oct 20

Find the Duplicate Number

Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.

1 min
Oct 20

Majority Element I & II

Given an array nums of size n, return the majority element.

3 min
Oct 20

Merge Intervals

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that c…

1 min
Oct 20

Next Permutation

Find the next lexicographically greater permutation.

2 min
Oct 20

Rotate Image

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).

2 min
Oct 20

Set Matrix Zeroes

Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's.

2 min
Oct 20

Sort Colors

Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the ord…

1 min
Oct 20

prompt

I've added more files in this folder format for readability as a markdown file don't change how i have phrased my sentences they are written for me

1 min
Oct 20

Scaling — Flash Reference

Ability of a system to handle increased load by adding resources without a full architectural overhaul.

3 min