发布时间:2015-04-07 10:49:39
/Merge k Sorted Lists Total Accepted: 38333 Total Submissions: 181458 My Submissions Question Solution //Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.import java.util.Comparator;import java.util.List;import java.util.PriorityQueue;//Me.........【阅读全文】
发布时间:2015-04-06 13:34:32
//Single Number II Total Accepted: 45470 Total Submissions: 131046 My Submissions Question Solution //Given an array of integers, every element appears three times except for one. Find that single one.////Note://Your algorithm should have a linear runtime complexity. Could you implement it .........【阅读全文】
发布时间:2015-04-06 10:11:01
Generate Parentheses Total Accepted: 40282 Total Submissions: 124502My SubmissionsQuestion Solution Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses..........【阅读全文】
发布时间:2015-04-02 19:08:54
import java.util.HashMap;import java.util.Map;import java.util.Stack;//Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.////The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" a.........【阅读全文】
发布时间:2015-04-02 15:38:55
/Remove Nth Node From End of List Total Accepted: 46481 Total Submissions: 167543 My Submissions Question Solution //Given a linked list, remove the nth node from the end of list and return its head.////For example,//// Given linked list: 1->2->3->4->5, and n = 2.//// After.........【阅读全文】