- 博客(7)
- 资源 (1)
- 问答 (3)
- 收藏
- 关注
原创 LeetCode Add Digits
Description: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2
2015-09-23 09:16:07 254
原创 LeetCode Bitwise AND of Numbers Range
Description: Given a range [m, n] where 0 For example, given the range [5, 7], you should return 4. Solution:
2015-09-06 08:33:05 272
原创 LeetCode Best Time to Buy and Sell Stock IV
Description: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most k transactions.
2015-09-06 06:08:09 324
原创 LeetCode Group Anagrams
Description: Given an array of strings, return all groups of strings that are anagrams. Solution: import java.util.*; public class Solution { ArrayList list = new ArrayList(); TreeMap> map
2015-09-05 22:55:04 454
原创 LeetCode Find Minimum in Rotated Sorted Array & LeetCode Find Minimum in Rotated Sorted Array II
Find Minimum in Rotated Sorted Array 题意:给出一个旋转后的数组,不知道旋转点在哪里,求整个数组的最小值 解法:……刚刚看到题目的时候我也是震惊了,貌似遍历一遍就可以了,那么提议当中的旋转点貌似是多余的?……突然感觉到了深深的恶意…… public class Solution { public int findMin(int[] num) { in
2015-09-05 22:21:21 301
原创 LeetCode Binary Tree Paths
Description: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf paths are: ["1->2->5", "1
2015-09-03 21:07:21 249
原创 LeetCode Valid Anagram
Description: Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return true. s = "rat", t = "car", return false. So
2015-09-03 12:08:53 252
java中的sql语句为何会报错,而到了workbench就可以执行
2015-03-17
Python获得网卡IP的几个参数问题
2015-01-12
Python中注释前面加上引号是什么意思?
2014-12-30
TA创建的收藏夹 TA关注的收藏夹
TA关注的人