上一页 1 2 3 4 5 6 7 ··· 20 下一页
摘要: Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a 阅读全文
posted @ 2018-03-25 22:07 Vincent丶丶 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 题解: 归并思想。 Solution 1 Solution 2 利用最小堆,c++的优先队列prior 阅读全文
posted @ 2018-03-25 21:56 Vincent丶丶 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 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. Example: 阅读全文
posted @ 2018-03-25 20:41 Vincent丶丶 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
posted @ 2018-03-25 20:34 Vincent丶丶 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head. For example, Note:Given n will always be valid.Try to do this in on 阅读全文
posted @ 2018-03-25 20:06 Vincent丶丶 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings. 题解: 简单的暴力遍历解决 阅读全文
posted @ 2018-03-25 17:04 Vincent丶丶 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. Given an integer, convert it to a roman nu 阅读全文
posted @ 2018-03-25 16:51 Vincent丶丶 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. Given a roman numeral, convert it to an in 阅读全文
posted @ 2018-03-25 16:23 Vincent丶丶 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Implement regular expression matching with support for '.' and '*'. 题解: 这种题是最无语的。。。我试着用遍历做,当 s 为空,p 不为空时的判定怎么也总结不出规律了。还是得用递归做 注意 ’*‘ 之前必须有字符供其匹配。s = " 阅读全文
posted @ 2018-03-25 15:56 Vincent丶丶 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thi 阅读全文
posted @ 2018-03-25 14:04 Vincent丶丶 阅读(161) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 20 下一页