Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: Read More
Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtime complex Read More
Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length Read More
不额外申请内存(另外的一个二维数组空间),将一个方阵(二维数组)原地旋转90度,主要的思路是,由外向内,一圈圈的进行旋转(就是依次进行交换),如下图所示,当这些圈圈都交换完了之后,就完成了原地旋转了。 代码如下: 代码中还涉及到了通过new与delete分配与释放一个二维数组,也是面试中的一个问题。 Read More
今天编译的过程中遇到的问题以及查阅到的资料,记录在这里,希望可以帮到其他人。 BVLC的caffe源码,如果要编译matlab的接口时,首先需要将makefile.config文件中的matlab的安装路径给到: 然后再 make all 在这里make的过程中,如果采用-j8多和编译的时候,可能会 Read More