随笔分类 -  LeetCode

上一页 1 2

LeetCode刷题记录和总结
leecode-39. Combination Sum
摘要:1、问题描述: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbe 阅读全文

posted @ 2017-08-27 13:34 Shihu 阅读(188) 评论(0) 推荐(0)

[LeetCode]169. Majority Element
摘要:1.Description Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may a 阅读全文

posted @ 2017-08-26 20:59 Shihu 阅读(288) 评论(0) 推荐(0)

234. Palindrome Linked List
摘要:旋转链表函数 public ListNode reverse(ListNode head) { ListNode prev = null; while (head != null) { ListNode next = head.next; head.next = prev; prev = head; 阅读全文

posted @ 2017-08-26 20:58 Shihu 阅读(314) 评论(0) 推荐(0)

[LeetCode]189. Rotate Array
摘要:1、题目描述 Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3, 阅读全文

posted @ 2017-08-10 21:34 Shihu 阅读(148) 评论(0) 推荐(0)

上一页 1 2

导航