- 博客(17)
- 收藏
- 关注
原创 Leetcode算法学习日志-202 Happy Number
Leetcode 202 Happy Number题目原文Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the
2017-11-23 11:47:13 371
原创 Leetcode算法学习日志-309 Best Time to Buy and Sell Stock with Cooldown
Leetcode 309 Best Time to Buy and Sell Stock with Cooldown题目原文Say you have an array for which the ith element is the price of a given stock on dayi.Design an algorithm to find the maximum pr
2017-11-22 20:38:57 324
原创 Leetcode算法学习日志-436 Find Right Interval
Leetcode 436 Find Right Interval题目原文Given a set of intervals, for each of the interval i, check if there exists an interval j whose start point is bigger than or equal to the end point of the in
2017-11-21 21:42:07 663 1
原创 Leetcode算法学习日志-399 Evaluate Division
Leetcode 399 Evaluate Division题目原文Equations are given in the format A / B = k, whereA and B are variables represented as strings, and k is a real number (floating point number). Given some q
2017-11-19 16:06:14 613
原创 Leetcode算法学习日志-89 Gray Code
Leetcode 89 Gray Code题目原文The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total number of bits in the
2017-11-15 22:03:24 319
原创 Leetcode算法学习日志-394 Decode String
Leetcode 394 Decode String题目原文Given an encoded string, return it's decoded string.The encoding rule is: k[encoded_string], where theencoded_string inside the square brackets is being repeate
2017-11-15 11:39:44 435
原创 编码理论中所需代数知识总结
编码理论中所需代数知识总结一、群1、一个定义了二元运算*的集合G如果满足如下条件,则称之为群。二元运算*满足结合律存在单位元e,使得a*e=e*a=a对于G中任意元素a,存在逆元a‘,使得a*a'=a'*a=e如果二元运算*满足交换律,则上述群是交换群(abel群),如不满足二三条,称为半群,如还满足交换律,称为交换半群2、群的单位元和逆元都是唯一的。3、集合G中的元素不一
2017-11-14 21:12:02 2614
原创 Leetcode算法学习日志-386 Lexicographical Numbers
Leetcode 386 Lexicographical Numbers题目原文Given an integer n, return 1 - n in lexicographical order.For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9].Please optimize your algorith
2017-11-14 15:09:51 365
原创 Leetcode算法学习日志-62 Unique Paths
Leetcode 62 Unique Paths题目原文A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time.
2017-11-12 15:18:03 238
原创 Leetcode算法学习日志-611 Valid Triangle Number
Leetcode 611 Valid Triangle Number 题目原文Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we take t
2017-11-09 21:43:10 519
原创 Leetcode算法学习日志-137 Single Number II
Leetcode 137 Single Number II题目原文Given an array of integers, every element appearsthree times except for one, which appears exactly once. Find that single one.Note:Your algorithm should ha
2017-11-09 10:21:01 246
原创 Leetcode算法学习日志-341 Flatten Nested List Iterator
Leetcode 341 Flatten Nested List Iterator题目原文Given a nested list of integers, implement an iterator to flatten it.Each element is either an integer, or a list -- whose elements may also be int
2017-11-07 20:37:20 477
原创 Leetcode算法学习日志-78 Subsets
Leetcode 78 Subsets题目原文Given a set of distinct integers,nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.For example,If nums =
2017-11-07 19:29:33 286
原创 Leetcode算法学习日志-173 Binary Search Tree Iterator
Leetcode 173 Binary Search Tree Iterator题目原文Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the
2017-11-05 15:23:16 327
原创 Leetcode算法学习日志-563 Binary Tree Tilt
Leetcode 563 Binary Tree Tilt题目原文Given a binary tree, return the tilt of the whole tree.The tilt of a tree node is defined as theabsolute difference between the sum of all left subtree nod
2017-11-02 12:00:19 299
原创 Leetcode算法学习日志-561 Array Partition I
Leetcode 561 Array Partition I题目原文Given an array of 2n integers, your task is to group these integers inton pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, b
2017-11-02 11:21:50 258
原创 Leetcode算法学习日志-553 Optimal Division
Leetcode 553 Optimal Division题目原文Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4.However, you can add any number of
2017-11-01 20:09:20 244
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人