摘要: 众所周知,C++虚函数是一大难点,也是面试过程中必考部分。此次,从虚函数的相关概念、虚函数表、纯虚函数、再到虚继承等等跟虚函数相关部分,做一个比较细致的整理和复习。阅读全文
posted @ 2017-04-04 22:37 JeffLai 阅读(301) 评论(1) 编辑
摘要: 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.阅读全文
posted @ 2017-05-17 22:21 JeffLai 阅读(3) 评论(0) 编辑
摘要: 前段时间面试的时候,遇到一个问题,线程池应该设置多少线程合适,怎么样估算出来。最近接触到一些相关资料,现作如下总结。阅读全文
posted @ 2017-05-17 21:12 JeffLai 阅读(4) 评论(0) 编辑
摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.阅读全文
posted @ 2017-05-16 22:43 JeffLai 阅读(2) 评论(0) 编辑
摘要: 红黑树(Red Black Tree) 是一种自平衡二叉查找树,是在计算机科学中用到的一种数据结构。下面对红黑树,以及二叉查找树等相关概念作一个总结。阅读全文
posted @ 2017-05-16 17:02 JeffLai 阅读(25) 评论(0) 编辑
摘要: B树是为磁盘或其他直接存取的辅助存储设备而设计的一种平衡搜索树。B树类似于红黑树,但它们在降低磁盘I/O操场数方面要更好一些。许多数据库系统使用B树或B树的变种来存储信息。阅读全文
posted @ 2017-05-16 10:46 JeffLai 阅读(16) 评论(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum.阅读全文
posted @ 2017-05-15 18:23 JeffLai 阅读(4) 评论(0) 编辑
摘要: Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions.阅读全文
posted @ 2017-05-15 12:03 JeffLai 阅读(5) 评论(0) 编辑
摘要: 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.阅读全文
posted @ 2017-05-13 20:23 JeffLai 阅读(11) 评论(0) 编辑
摘要: Implement pow(x, n).阅读全文
posted @ 2017-05-13 11:01 JeffLai 阅读(8) 评论(0) 编辑
摘要: Given an array of strings, group anagrams together.阅读全文
posted @ 2017-05-13 10:33 JeffLai 阅读(6) 评论(0) 编辑