一. 题目描述 Given a positive integer n, break it into the sum of at least two positive integers and maximize the p…
标签:LeetCode
leetcode笔记:House Robber III
一. 题目描述 The thief has found himself a new place for his thievery again. There is only one entrance to this are…
leetcode笔记:Remove Duplicate Letters
一. 题目描述 Given a string which contains only lowercase letters, remove duplicate letters so that every letter ap…
leetcode笔记:Number of 1 Bits
一. 题目描述 Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known …
leetcode笔记:Power of Four
一. 题目描述 Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example: Give…
leetcode笔记:Invert Binary Tree
一. 题目描述 Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 Trivia: This problem was …
leetcode笔记:Counting Bits
一. 题目描述 Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the nu…
leetcode笔记:Reconstruct Itinerary
一. 题目描述 Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], rec…
leetcode笔记:Remove Linked List Elements
一. 题目描述 Remove all elements from a linked list of integers that have value val. Example Given: 1 --> 2 --&g…
leetcode笔记:Excel Sheet Column Number
一. 题目描述 Given a column title as appear in an Excel sheet, return its corresponding column number. For example:…
leetcode笔记:Reverse Vowels of a String
一. 题目描述 Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Give…
leetcode笔记:Merge Two Sorted Lists
一. 题目描述 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing tog…