12 2016 档案

摘要:38. Count and Say The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" o 阅读全文
posted @ 2016-12-25 18:46 司马_羽鹤 阅读(160) 评论(0) 推荐(0)
摘要:27. Remove Element Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for 阅读全文
posted @ 2016-12-16 10:30 司马_羽鹤 阅读(135) 评论(0) 推荐(0)
摘要: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 司马_羽鹤 阅读(150) 评论(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 司马_羽鹤 阅读(127) 评论(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 司马_羽鹤 阅读(236) 评论(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 司马_羽鹤 阅读(169) 评论(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 司马_羽鹤 阅读(269) 评论(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 司马_羽鹤 阅读(201) 评论(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 司马_羽鹤 阅读(229) 评论(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 司马_羽鹤 阅读(169) 评论(0) 推荐(0)