leetCode[002]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”.

Read more
leetCode[003]Two Sum

本文主要包括leetCode题集里的两个题目,Two Sum1 和 Two Sum2

Read more
leetCode[002]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 two linked lists have no intersection at all, return null.
    2. The linked lists must retain their original structure after the function returns.
    3. You may assume there are no cycles anywhere in the entire linked structure.
    4. Your code should preferably run in O(n) time and use only O(1) memory

Read more
关于Lambda的一点梳理

关于C++11的新特性,最近接触比较多的就是关于thread的部分,还有就是Lambda表达式,今天主要针对Lambda的用法进行一定的阐述和汇总(参考链接在文章下方,向大师致敬!),同时给自己梳理下知识点,加深印象。

Read more
leetCode[001]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.

Read more
scala Day2

因为这几天在学习Coursera公开课Principles of Reactive Programming ,因为之前木有木有注意到需要对至少一门函数式编程语言solid foundation,因此只能临时抱佛脚,恰好手头有一本七周七语言这本书一直木有看,借着这个课程的督促把这本书翻看下,当然内容仅包括Scala这一章,今天看到第二天的内容,重头戏是Collection。这篇blog主要记录关于这次自习题的解答。

Read more
博客之旅
如果你不给自己烦恼,别人也永远不可能给你烦恼,因为你自己的内心,你放不下 其实写博客一直在我的ToDoList上,不过放的时间有点久。我就是这样一个人,想干的太多,做到的却相当少。因此写这个博客的目的也是想督促自己前行,记录生活点滴的同时也能够让自己对生活有一些感悟。告诉自己,世界很大,千万不要 ...
Read more