- 博客(4)
- 收藏
- 关注
原创 Leetcode-239-Sliding Window Maximum
Given an array nums, there is a sliding window of sizek which is moving from the very left of the array to the very right. You can only see thek numbers in the window. Each time the sliding window
2015-11-18 10:03:52 366
原创 Leetcode-149-Max Ponits on a Line C#
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.题意:找到在同一直线上的点的最大个数。分析:首先看这个题的暴力方法,两点确定一条直线,所以确定下一条直线后,挨个验证剩下的点是不是也在这条直线上,并记录个数,O(n^3)的时间复杂度就可以解决问
2015-11-12 15:30:48 416
原创 Leetcode-91-Decode Ways C#
A message containing letters fromA-Z is being encoded to numbers using the following mapping: 'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total nu
2015-11-03 16:16:25 712
原创 Leetcode-43-Multiply Strings C#
Given two numbers represented as strings, return multiplication of the numbers as a string.题意:给两个字符串,返回这两个字符串代表的数字的乘积字符串。解析:把字符串转换成数字,做乘法,再将结果转化回字符串,这种方法肯定是不行的,因为上限问题。所以需要自己实现一个乘法算法。乘法都学过,1234
2015-11-02 10:36:41 615
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人