随笔分类 -  leetcode_sort

摘要:Sort a linked list in O(n log n) time using constant space complexity. 含义:为一个列表排序,要求空间复杂度为常量 思路:使用归并排序 1 public class Solution { 2 public ListNode sor 阅读全文
posted @ 2017-10-25 16:03 daniel456 阅读(85) 评论(0) 推荐(0) 编辑
摘要:Sort a linked list using insertion sort. 含义:用插入排序来对列表进行排序 思路:可以构建一个临时的链表,然后将待排序的链表的每一个节点插入到临时链表中 // 插入排序 public ListNode insertionSortList(ListNode he 阅读全文
posted @ 2017-10-25 15:50 daniel456 阅读(82) 评论(0) 推荐(0) 编辑
摘要:Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. 阅读全文
posted @ 2017-10-24 16:17 daniel456 阅读(114) 评论(0) 推荐(0) 编辑
摘要:Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According 阅读全文
posted @ 2017-10-24 11:18 daniel456 阅读(136) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示