leetcode
genghaihua
这个作者很懒,什么都没留下…
展开
-
Reverse Words in a String
#include #include #include #include using namespace std;int main() { string str = "the sky is blue"; //reverseWords(str); string fs=""; stack strs; int len=str.length()-1; int begin=0; int原创 2014-08-31 00:41:58 · 632 阅读 · 0 评论 -
Two Sum
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原创 2015-11-16 16:25:11 · 391 阅读 · 0 评论 -
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link原创 2015-11-16 16:23:49 · 358 阅读 · 0 评论 -
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo原创 2015-11-29 15:53:39 · 396 阅读 · 0 评论