Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2014-10-26 17:04:21
阅读次数:
193
Follow up for N-Queens problem.
Now, instead outputting board configurations, return the total number of distinct solutions.
class Solution {
private:
int res;
public:
int totalNQuee...
分类:
其他好文 时间:
2014-10-26 15:43:03
阅读次数:
168
问题描述:
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree...
分类:
其他好文 时间:
2014-10-26 13:11:29
阅读次数:
177
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:
其他好文 时间:
2014-10-26 06:47:17
阅读次数:
187
Rotate ImageYou are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?SOL...
分类:
其他好文 时间:
2014-10-25 21:29:02
阅读次数:
317
module multiplier(input clk,rst,input [7:0] A,B,output [16:0] C);reg [3:0] cnt;reg [16:0] temp;always@(posedge clk or negedge rst)if(!rst)begincnt<=0;...
分类:
其他好文 时间:
2014-10-25 20:00:40
阅读次数:
335
DescriptionIn the two-player game "Two Ends", an even number of cards is laid out in a row. On each card, face up, is written a positive integer. Play...
分类:
其他好文 时间:
2014-10-25 18:32:56
阅读次数:
207
1 首先我们要下载一个Libsvm 工具箱 这个在哪都是可以下载到的
2 我们将压缩包解压 我是解压在桌面上 地址为C:\Users\Administrator\Desktop\libsvm
3
4 我们按照这个流程输入以下代码
>> mex -setup
Welcome to mex -setup. This utility will help you set up...
分类:
其他好文 时间:
2014-10-25 11:57:46
阅读次数:
228
Find Minimum in Rotated Sorted Array II Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-...
分类:
其他好文 时间:
2014-10-24 20:42:30
阅读次数:
299
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2014-10-24 18:07:56
阅读次数:
170