455.Assign Cookies

Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.

Each child has a greed factor , which is the minimum size of a cookie that the child will be content with; and each cookie has a size . If , we can assign the cookie to the child , and the child will be content. Your goal is to maximize the number of your content children and output the maximum number.

Read more »

415.Add Strings

Given two non-negative integers, and represented as string, return the sum of and as a string.

You must solve the problem without using any built-in library for handling large integers (such as ). You must also not convert the inputs to integers directly.

Read more »

412.Fizz Buzz

Given an integer , return a string array (1-indexed) where:

  • if is divisible by and .
  • if is divisible by .
  • if is divisible by .
  • (as a string) if none of the above conditions are true.
Read more »

409.Longest Palindrome

Given a string which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters.

Letters are case sensitive, for example, is not considered a palindrome here.

Read more »

401.Binary Watch

A binary watch has 4 LEDs on the top to represent the hours (0-11), and 6 LEDs on the bottom to represent the minutes (0-59). Each LED represents a zero or one, with the least significant bit on the right.

  • For example, the below binary watch reads .
Read more »