343. Integer Break

Problem description:

Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.

Readmore

264. Ugly Number II

Problem description:

Write a program to find the n-th ugly number.

Readmore

307. Range Sum Query - Mutable

Problem description:

Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.

Readmore

139. Word Break

Problem description:

Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words. You may assume the dictionary does not contain duplicate words.

Readmore

337. House Robber III

Problem description:

The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the “root.” Besides the root, each house has one and only one parent house. After a tour, the smart thief realized that “all houses in this place forms a binary tree”. It will automatically contact the police if two directly-linked houses were broken into on the same night.

Readmore

213. House Robber II

Problem description:

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken into on the same night.

Readmore

198. House Robber

Problem description:

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken into on the same night.

Readmore

5. Longest Palindromic Substring

Problem description:

Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.

Readmore

339. Nested List Weight Sum

Problem description:

Given a nested list of integers, return the sum of all integers in the list weighted by their depth.

Readmore

364. Nested List Weight Sum II

Problem description:

Given a nested list of integers, return the sum of all integers in the list weighted by their depth.

Readmore