关于单链表的那些事儿

关于有环单链表,即单链表中存在环路,该问题衍生出很多面试题,特在此汇总,方便查阅也帮助自己梳理下思路。 如下图1所示为有环单链表,假设头结点为

[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的用法进行一定的阐述