[151] Reverse Words in a String

题目:Reverse Words in a String Given an input string s, reverse the string word by word. For example, given s = “the sky is blue”, return “blue is sky the”. 题意: 题意很明确,将字符串中的单词进行翻转,形成新的字符串。但

Two Sum

本文主要包括 leetCode 题集里的两个题目,Two Sum1 和 Two Sum2 题目1: 1. Two Sum 1 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, where index1 must

[160] Intersection of Two Linked Lists

题目:Intersection of Two Linked lists Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 ↘ c1 → c2 → c3 ↗ B: b1 → b2 → b3 begin to intersect at node c1. Notes: 1. If the

关于Lambda的一点梳理

关于C++11的新特性,最近接触比较多的就是关于thread的部分,还有就是Lambda表达式,今天主要针对Lambda的用法进行一定的阐述

[152] Maximum Product Subarray

题目: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the largest product = 6. 题意: 题目中给出一个(至少包含一个元素)整形数组,求一个子数组(元素