Rockwall

导航

2016年8月6日 #

LeetCode 【190. Reverse Bits】

摘要: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur 阅读全文

posted @ 2016-08-06 16:59 Rockwall 阅读(184) 评论(0) 推荐(0)

LeetCode 【21. Merge Two Sorted Lists】

摘要: 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. 思路.首先判断是 阅读全文

posted @ 2016-08-06 16:07 Rockwall 阅读(171) 评论(0) 推荐(0)

LeetCode 【235. Lowest Common Ancestor of a Binary Search Tree】

摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文

posted @ 2016-08-06 15:56 Rockwall 阅读(154) 评论(0) 推荐(0)

LeetCode【217. Contains Duplicate】

摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文

posted @ 2016-08-06 15:49 Rockwall 阅读(445) 评论(0) 推荐(0)

LeetCode【169. Majority Element】

摘要: 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 assume that the 阅读全文

posted @ 2016-08-06 15:31 Rockwall 阅读(228) 评论(0) 推荐(0)