
LeetCode
文章平均质量分 70
tyjhField
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Word Pattern
Given a pattern and a string str, find if str follows the same pattern.Examples:pattern = "abba", str = "dog cat cat dog" should return true.pattern = "abba", str = "dog cat cat fish"原创 2015-10-09 23:18:56 · 1104 阅读 · 0 评论 -
Game of Life
According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970."Given a board with m原创 2015-10-10 00:31:57 · 576 阅读 · 0 评论 -
Contains Duplicate II
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and jis at most k.c原创 2015-10-09 23:23:17 · 409 阅读 · 0 评论 -
Max Points on a Line
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line./** * Definition for a point. * struct Point { * int x; * int y; * Point() : x(0原创 2015-10-11 01:48:47 · 603 阅读 · 0 评论 -
求数组和最大的最长子列
#include <iostream>int maxSubarray(int a[], int size) { if (size <= 0) std::cout << "error array size\n"; int max = 0x80000000; int cur = 0; int start, end; while...原创 2018-09-06 00:04:02 · 306 阅读 · 0 评论