All Posts

Leetcode 455: Assign Cookies

You are a parent with several children and a set of cookies. Each child has a greed factor, which is the minimum size of a cookie they will be happy with. Each cookie also has a size. Your task is to distribute the cookies such that you maximize the number of content children. Each child can receive at most one cookie, and each cookie can only be given to one child.

Leetcode 459: Repeated Substring Pattern

Given a string, determine if it can be formed by repeating a substring of itself multiple times.

Leetcode 501: Find Mode in Binary Search Tree

Given the root of a binary search tree (BST) with possible duplicates, return the mode(s) (i.e., the most frequently occurring element) in the tree. If there are multiple modes, return them in any order.

Leetcode 509: Fibonacci Number

The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, starting from 0 and 1. Given an integer n, return the nth Fibonacci number.

Leetcode 520: Detect Capital

We define the correct usage of capital letters in a word as either all letters being capitalized, all letters being lowercase, or only the first letter being capitalized while the rest are lowercase. Given a string word, return true if the word follows one of these patterns, and false otherwise.

Leetcode 530: Minimum Absolute Difference in BST

Given the root of a Binary Search Tree (BST), return the minimum absolute difference between the values of any two different nodes in the tree.