上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页

2015年9月11日

leetcode面试准备:Kth Largest Element in an Array

摘要: leetcode面试准备:Kth Largest Element in an Array === 1 题目 Find the kth largest element in an unsorted array. Note that it is the kth largest element in ... 阅读全文

posted @ 2015-09-11 15:13 BYRHuangQiang 阅读(280) 评论(0) 推荐(0) 编辑

2015年9月10日

leetcode面试准备:Minimum Size Subarray Sum

摘要: leetcode面试准备:Minimum Size Subarray Sum === 1 题目 Given an array of n positive integers and a positive integer s, find the minimal length of a subarra... 阅读全文

posted @ 2015-09-10 15:16 BYRHuangQiang 阅读(221) 评论(0) 推荐(0) 编辑

leetcode面试准备: Substring with Concatenation of All Words

摘要: leetcode面试准备: Substring with Concatenation of All Words === 1 题目 You are given a string, s, and a list of words, words, that are all of the same leng... 阅读全文

posted @ 2015-09-10 12:18 BYRHuangQiang 阅读(218) 评论(0) 推荐(0) 编辑

2015年9月9日

leetcode面试准备:Valid Anagram

摘要: leetcode面试准备:Valid Anagram === 1 题目 Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t... 阅读全文

posted @ 2015-09-09 21:10 BYRHuangQiang 阅读(231) 评论(0) 推荐(0) 编辑

leetcode面试准备:Divide Two Integers

摘要: leetcode面试准备:Divide Two Integers === 1 题目 Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX... 阅读全文

posted @ 2015-09-09 17:59 BYRHuangQiang 阅读(219) 评论(0) 推荐(0) 编辑

leetcode面试准备:Container With Most Water

摘要: leetcode面试准备:Container With Most Water === 1 题目 Given n non negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). ... 阅读全文

posted @ 2015-09-09 15:44 BYRHuangQiang 阅读(409) 评论(0) 推荐(0) 编辑

2015年8月12日

面试:归并排序和分治法

摘要: 面试:归并排序和分治法===归并排序算法,时间复杂度`O(NlogN)`,空间复杂度`O(N)`。分治法(Divide and Conquer)的一个非常典型的应用。参考 链表的归并,模板代码:[Merge K Sorted Lists--leetcode](https://github.com/H... 阅读全文

posted @ 2015-08-12 11:10 BYRHuangQiang 阅读(896) 评论(0) 推荐(1) 编辑

2015年8月7日

leetcode面试准备:Lowest Common Ancestor of a Binary Search Tree & Binary Tree

摘要: leetcode面试准备:Lowest Common Ancestor of a Binary Search Tree & Binary Tree===# 1 题目## Binary Search Tree的LCA> Given a binary search tree (BST), find th... 阅读全文

posted @ 2015-08-07 15:10 BYRHuangQiang 阅读(491) 评论(0) 推荐(0) 编辑

2015年8月6日

Leetcode解题思想总结篇:双指针

摘要: Leetcode解题思想总结篇:双指针===#1概念双指针:快慢指针。快指针在每一步走的步长要比慢指针一步走的步长要多。快指针通常的步速是慢指针的2倍。在循环中的指针移动通常为:`faster = faster.next.next; slower = slower.next; `# 2 应用## 2... 阅读全文

posted @ 2015-08-06 17:37 BYRHuangQiang 阅读(7408) 评论(0) 推荐(2) 编辑

leetcode面试准备: CountPrimes

摘要: # 1 题目> Description:Count the number of prime numbers less than a non-negative number, n.**接口**:`public int countPrimes(int n);`# 2 思路统计小于n的素数个数,注意不包括... 阅读全文

posted @ 2015-08-06 11:24 BYRHuangQiang 阅读(701) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页

导航