
leetcode
文章平均质量分 57
AlwaysCoding
AlwaysCoding
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
leetcode(longest consecutive sequence)
Longest Consecutive Sequence Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest原创 2013-11-03 19:16:56 · 801 阅读 · 0 评论 -
[leetcode]SameTree
Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the原创 2013-12-10 10:52:34 · 876 阅读 · 0 评论 -
[leetcode]twoSum
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, whe原创 2013-12-21 21:24:58 · 833 阅读 · 0 评论 -
Value Palindrome
运用了STL函数。#include #include using namespace std; bool isPalindrome1(string text) { text.erase(remove_if(text.begin(), text.end(), [](char c){ //lambda return !isalpha(c) ; }), text.end());原创 2013-12-11 10:14:51 · 795 阅读 · 0 评论 -
[LeetCode]3sum
#include #include #include using namespace std; class solution{ public: vector > threesum(vector& num){ vector > result; if(num.size() sort(num.begin(),num.end()); const int target=0;原创 2013-11-03 19:46:24 · 1004 阅读 · 0 评论