2015年9月14日

摘要: 1 题目Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.2 思路当时看到这个题目就想到的是归并排序。好吧,但是,具体代码写不出来。题目给的是数组:publi... 阅读全文
posted @ 2015-09-14 22:13 聆听V风声 阅读(169) 评论(0) 推荐(0) 编辑

2015年9月6日

摘要: 1 题目:Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"(... 阅读全文
posted @ 2015-09-06 21:37 聆听V风声 阅读(206) 评论(0) 推荐(0) 编辑

2015年9月4日

摘要: 1 题目:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.2 思路... 阅读全文
posted @ 2015-09-04 22:20 聆听V风声 阅读(138) 评论(0) 推荐(0) 编辑

2015年9月3日

摘要: 1 题目Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the corr... 阅读全文
posted @ 2015-09-03 11:10 聆听V风声 阅读(118) 评论(0) 推荐(0) 编辑

2015年9月2日

摘要: 1 题目:Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the su... 阅读全文
posted @ 2015-09-02 22:04 聆听V风声 阅读(156) 评论(0) 推荐(0) 编辑
 
摘要: 1 题目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. Afte... 阅读全文
posted @ 2015-09-02 19:29 聆听V风声 阅读(115) 评论(0) 推荐(0) 编辑
 
摘要: 1 题目:Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the tel... 阅读全文
posted @ 2015-09-02 16:00 聆听V风声 阅读(149) 评论(0) 推荐(0) 编辑

2015年9月1日

摘要: 1 题目:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 12 思路:这是因为谷歌面试xx而著名的题,拿来做做。想了一会,想出来... 阅读全文
posted @ 2015-09-01 19:13 聆听V风声 阅读(133) 评论(0) 推荐(0) 编辑
 
摘要: 1 题目Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. Y... 阅读全文
posted @ 2015-09-01 09:40 聆听V风声 阅读(135) 评论(0) 推荐(0) 编辑

2015年6月15日

摘要: 1 题目:Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:E... 阅读全文
posted @ 2015-06-15 10:46 聆听V风声 阅读(144) 评论(0) 推荐(0) 编辑