摘要: 24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the li 阅读全文
posted @ 2016-12-16 10:28 司马_羽鹤 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 20. Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brack 阅读全文
posted @ 2016-12-16 10:26 司马_羽鹤 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 主要讨论:链表是啥?都有什么形式?与数组相比的优势?以及在STL标准库中list<T>所构造的是否为普通意义上的链表? 1.链表的定义:(来自wiki: https://en.wikipedia.org/wiki/Linked_list) In computer science, a linked 阅读全文
posted @ 2016-12-14 09:30 司马_羽鹤 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. 注:这题竟然连个示例都没有,说明特殊情况并不多,就是要找出所有字符串的最长 阅读全文
posted @ 2016-12-12 09:00 司马_羽鹤 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 9. Palindrome Number Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative int 阅读全文
posted @ 2016-12-11 16:33 司马_羽鹤 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 今天的两道题关于基本数据类型的探讨,估计也是要考虑各种情况,要细致学习 7. Reverse Integer Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Hav 阅读全文
posted @ 2016-12-10 23:42 司马_羽鹤 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input wo 阅读全文
posted @ 2016-12-09 19:38 司马_羽鹤 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input wo 阅读全文
posted @ 2016-12-09 08:51 司马_羽鹤 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 这个static 如果写在类中,那么就可以得到一个局部的静态变量,也就是说可以实现在类内保存某个特殊值不随函数释放而消失的作用。应用中由于赋初值的位置不对而报错,错误提示为:“无法解析外部符号 。。。”,这里将更改之后的代码放上来: mytest_static.h mytest_static.cpp 阅读全文
posted @ 2016-11-15 11:04 司马_羽鹤 阅读(3033) 评论(0) 推荐(0) 编辑
摘要: 阅读文献:Distance Dependent Infinite Latent Feature Model 作者:Samuel J.Gershman ,Peter I.Frazier ,and David M.Blei 摘要: 潜在特征模型在对数据进行小模块分解的过程中被广泛使用。这些模型的贝叶斯非参数变量在潜在特征上使用了IBP先验,进而使得特征的数量由数据决定。我们提出了一种一般化的IB... 阅读全文
posted @ 2016-10-18 19:26 司马_羽鹤 阅读(454) 评论(0) 推荐(0) 编辑