12 2014 档案

摘要:Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 ... 阅读全文
posted @ 2014-12-29 14:51 BestWangJie 阅读(131) 评论(0) 推荐(0)
摘要:problem:Given an input string, reverse the string word by word.For example:Given s = "the sky is blue",return "blue is sky the".问题分析:如何准确的找到每一个需要清除的空格... 阅读全文
posted @ 2014-12-23 19:40 BestWangJie 阅读(165) 评论(0) 推荐(0)
摘要:problem:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.problem analysis... 阅读全文
posted @ 2014-12-23 19:13 BestWangJie 阅读(164) 评论(0) 推荐(0)
摘要:今天做了一道MinStack的题,深深的感到自己C++还完全没有学好!!!#include #include using std::stack;class MinStack {public: stack st; stack stm; void push(int x) { ... 阅读全文
posted @ 2014-12-13 16:07 BestWangJie 阅读(126) 评论(0) 推荐(0)
摘要:我的代码是这样的:class Solution {public: ListNode *swapPairs(ListNode *head) { const int TRUE = 1; const int FALSE = 0; ListNod... 阅读全文
posted @ 2014-12-04 11:40 BestWangJie 阅读(122) 评论(0) 推荐(0)