LeetCode Optimal Division Given a list of positive integers, the adjacent integers will perform the float division. For example, -> 2 / 3 / 4. However, you can add any number of parenthesis at any position to change the priority of operations. You... Read More

# Monthly Archives: April 2017

# LeetCode Binary Tree Tilt

LeetCode Binary Tree Tilt Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subtree node values and the sum of all right subtree node values. Null node has... Read More

# LeetCode Array Partition I

LeetCode Array Partition I Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as possible. Example 1: Input:... Read More

# LeetCode Student Attendance Record II

LeetCode Student Attendance Record II Given a positive integer n, return the number of all possible attendance records with length n, which will be regarded as rewardable. The answer may be very large, return it after mod 109 + 7. A student attendance... Read More

# LeetCode Student Attendance Record I

LeetCode Student Attendance Record I You are given a string representing an attendance record for a student. The record only contains the following three characters: 'A' : Absent. 'L' : Late. 'P' : Present. A student could be rewarded if his... Read More

# LeetCode Longest Uncommon Subsequence I

LeetCode Longest Uncommon Subsequence I Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and... Read More

# LeetCode Reverse Words in a String III

LeetCode Reverse Words in a String III Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. Example 1: Input: "Let's take LeetCode contest" Output: "s'teL... Read More

# hihoCoder 1507-可疑的记录

hihoCoder 1507-可疑的记录 #1507 :... Read More

# hihoCoder 1508-剑刃风暴

hihoCoder 1508-剑刃风暴 #1508 :... Read More

# hihoCoder 1506-投掷硬币

hihoCoder 1506-投掷硬币 #1506 :... Read More