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...
分类:
其他好文 时间:
2015-07-13 17:34:45
阅读次数:
95
N-Queens II
Follow up for N-Queens problem.
Now, instead outputting board configurations, return the total number of distinct solutions.
思路:解决了上题,这题也就迎刃而解,或者说这题要不上题还要简单一些。
具体代码如下:
pub...
分类:
其他好文 时间:
2015-07-13 16:19:17
阅读次数:
111
Rotate Image
You 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?
思路:其实就是旋转数组,没有什么难度,代码如下:
public ...
分类:
其他好文 时间:
2015-07-13 14:05:28
阅读次数:
569
425.Which of the following are included in a transportable tablespace set? (Choose all that apply.)
A. The datafiles that make up a self-contained group of tablespaces required for copy
B. The syste...
分类:
其他好文 时间:
2015-07-13 14:04:57
阅读次数:
144
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.public class Solution { ...
分类:
其他好文 时间:
2015-07-12 17:01:11
阅读次数:
107
Palindrome Linked ListGiven a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?https://leetco...
分类:
编程语言 时间:
2015-07-12 17:00:30
阅读次数:
261
找到文件interfaces,路径:/etc/network/interfaces打开interfaces文件,看到以下内容:auto loiface lo inet loopbackauto dsl-provideriface dsl-provider inet ppppre-up /sbin/i...
分类:
系统相关 时间:
2015-07-12 12:36:29
阅读次数:
185
问题:One day when you are going to clear all your browsing history, you come up with an idea: You want to figure out what your most valued site is. Ever...
分类:
其他好文 时间:
2015-07-12 00:04:01
阅读次数:
189
Two SumGiven 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...
分类:
其他好文 时间:
2015-07-11 21:26:26
阅读次数:
170
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...
分类:
其他好文 时间:
2015-07-11 19:55:47
阅读次数:
177