摘要:
Given a collection of intervals, merge all overlapping intervals. 阅读全文
摘要:
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine if you are able to reach the last index. 阅读全文
摘要:
前段时间面试的时候,遇到一个问题,线程池应该设置多少线程合适,怎么样估算出来。最近接触到一些相关资料,现作如下总结。 阅读全文
摘要:
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. 阅读全文
摘要:
红黑树(Red Black Tree) 是一种自平衡二叉查找树,是在计算机科学中用到的一种数据结构。下面对红黑树,以及二叉查找树等相关概念作一个总结。 阅读全文
摘要:
B树是为磁盘或其他直接存取的辅助存储设备而设计的一种平衡搜索树。B树类似于红黑树,但它们在降低磁盘I/O操场数方面要更好一些。许多数据库系统使用B树或B树的变种来存储信息。 阅读全文
摘要:
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. 阅读全文
摘要:
Follow up for N-Queens problem.
Now, instead outputting board configurations, return the total number of distinct solutions. 阅读全文
摘要:
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
Given an integer n, return all distinct solutions to the n-queens puzzle.
Each solution contains a distinct board configuration of the n-queens' placement, where 'Q' and '.' both indicate a queen and an empty space respectively. 阅读全文
摘要:
Implement pow(x, n). 阅读全文