摘要:
Problem Statement A dieter consumes calories[i] calories on the i-th day. A dieter consumes calories[i] calories on the i-th day. Given an integer k, 阅读全文
摘要:
Problem Statement A transaction is possibly invalid if: A transaction is possibly invalid if: the amount exceeds $1000, or; if it occurs within (and i 阅读全文
摘要:
Problem Statement Given a binary tree, return all root-to-leaf paths. Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with 阅读全文
摘要:
Problem Statement Given a non-empty binary tree, find the maximum path sum. Given a non-empty binary tree, find the maximum path sum. For this problem 阅读全文
摘要:
Problem Statement Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Implement an i 阅读全文
摘要:
Problem Statement Implement a basic calculator to evaluate a simple expression string. Implement a basic calculator to evaluate a simple expression st 阅读全文
摘要:
Problem Statement Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, - 阅读全文
摘要:
Problem Statement Implement a basic calculator to evaluate a simple expression string. Implement a basic calculator to evaluate a simple expression st 阅读全文
摘要:
Problem Statement Given a binary tree, determine if it is height-balanced. Given a binary tree, determine if it is height-balanced. For this problem, 阅读全文
摘要:
Problem Statement Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. Given a non-negative integer nu 阅读全文