摘要:
[Problem]Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Y... 阅读全文
摘要:
[Problem]Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.[Analysis]这题一上来,就会想到之前做过的Merge Two Sorted Lis... 阅读全文
摘要:
[Problem]Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set i... 阅读全文
摘要:
[Problem]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.... 阅读全文
摘要:
[Problem]Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the... 阅读全文
摘要:
[Problem]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. ... 阅读全文
摘要:
[Problem]Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives th... 阅读全文
摘要:
[Problem]Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the... 阅读全文
摘要:
[Problem]Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three intege... 阅读全文
摘要:
[Problem]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.No... 阅读全文