摘要:
1 题目Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.2 思路当时看到这个题目就想到的是归并排序。好吧,但是,具体代码写不出来。题目给的是数组:publi... 阅读全文
2015年9月14日
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:"(... 阅读全文
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 思路... 阅读全文
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... 阅读全文
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
2015年9月1日
摘要:
1 题目:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 12 思路:这是因为谷歌面试xx而著名的题,拿来做做。想了一会,想出来... 阅读全文
摘要:
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... 阅读全文
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... 阅读全文