上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 43 下一页

2015年7月29日

20.Valid Parentheses (Stack)

摘要: Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文

posted @ 2015-07-29 21:09 joannae 阅读(281) 评论(0) 推荐(0) 编辑

19.Remove Nth Node From End of List(List; Two-Pointers)

摘要: Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re... 阅读全文

posted @ 2015-07-29 20:41 joannae 阅读(169) 评论(0) 推荐(0) 编辑

18.4Sum (Map)

摘要: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whic 阅读全文

posted @ 2015-07-29 20:05 joannae 阅读(238) 评论(0) 推荐(0) 编辑

2015年7月25日

17.Letter Combinations of a Phone Number(Back-Track)

摘要: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho 阅读全文

posted @ 2015-07-25 21:48 joannae 阅读(258) 评论(0) 推荐(0) 编辑

16.3Sum Closest (Two-Pointers)

摘要: Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m... 阅读全文

posted @ 2015-07-25 15:47 joannae 阅读(163) 评论(0) 推荐(0) 编辑

15.3Sum (Two-Pointers)

摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文

posted @ 2015-07-25 06:48 joannae 阅读(159) 评论(0) 推荐(0) 编辑

2015年7月24日

14.Longest Common Prefix (String)

摘要: Write a function to find the longest common prefix string amongst an array of strings.class Solution {public: string longestCommonPrefix(vector& st... 阅读全文

posted @ 2015-07-24 06:13 joannae 阅读(230) 评论(0) 推荐(0) 编辑

2015年7月23日

13.Roman to Integer (HashTable)

摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. Improve: 使用两个数组代替map,更节省空间。 阅读全文

posted @ 2015-07-23 20:28 joannae 阅读(152) 评论(0) 推荐(0) 编辑

2015年7月22日

9.Palindrome Number (INT)

摘要: Determine whether an integer is a palindrome. Do this without extra space.class Solution {public: bool isPalindrome(int x) { if(x = 1){ ... 阅读全文

posted @ 2015-07-22 01:27 joannae 阅读(214) 评论(0) 推荐(0) 编辑

2015年7月21日

编码方式

摘要: ASCII8位,共256种状态。最早只在美国用,空格、标点符号、数字、大小写字母等,一直编到了第127号。后来,世界各地开始用,127号之后就用来表示其它国家的一些字母、符号,还加入了很多画表格时需要用下到的横线、竖线、交叉等形状,一直把序号编到了255。从128 到255这一页的字符集被称“扩展字... 阅读全文

posted @ 2015-07-21 13:28 joannae 阅读(274) 评论(0) 推荐(0) 编辑

上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 43 下一页

导航