freeCookie


freeCookie_🍪

LC370. Range Addition

LC370. Range Addition Assume you have an array of length n initialized with all 0’s and are given k update operations. Each operation is represen...

LC363. Max Sum of Rectangle No Larger Than K

Find the max sum of a rectangle in the matrix such that its sum is no larger than k.

LC363. Max Sum of Rectangle No Larger Than K Given a non-empty 2D matrix matrix and an integer k, find the max sum of a rectangle in the matrix su...

LC354. Russian Doll Envelopes

LC354. Russian Doll Envelopes You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into...

LC330. Patching Array

LC330. Patching Array Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [...

LC321. Create Maximum Number

Find max k numbers in two array.

LC321. Create Maximum Number Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k &l...

LC316. Remove Duplicate Letters

LC316. Remove Duplicate Letters Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once an...

LC314. Binary Tree Vertical Order Traversal

Left to right vertically traversal.

LC314. Binary Tree Vertical Order Traversal Given a binary tree, return the vertical order traversal of its nodes’ values. (ie, from top to bottom...

LC312. Burst Balloons

LC312. Burst Balloons Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are aske...