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-10-04 19:35:04
阅读次数:
129
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.Follow up: Did you use extra space?A straight forward sol...
分类:
其他好文 时间:
2015-10-04 17:14:04
阅读次数:
176
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?class Solution ...
分类:
其他好文 时间:
2015-10-04 15:52:14
阅读次数:
154
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For ...
分类:
其他好文 时间:
2015-10-04 15:50:27
阅读次数:
229
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.Fo...
分类:
其他好文 时间:
2015-10-04 11:02:20
阅读次数:
115
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 nu...
分类:
其他好文 时间:
2015-10-03 21:55:41
阅读次数:
205
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array nums = [1,1,1,2,2,3],Your function shou....
分类:
其他好文 时间:
2015-10-03 11:50:30
阅读次数:
121
QUESTION NO: 75
You are peer reviewing a fellow DBA‘s backup plan for his NOARCHIVELOG mode database, as shown
here:
1. Put the tablespaces in backup mode.
2. Back up the datafiles for all tablesp...
分类:
其他好文 时间:
2015-10-03 06:10:51
阅读次数:
162
非常简单的模拟 1 #include 2 #include 3 #include 4 const int up = 6; 5 const int down = 4; 6 const int stop = 5; 7 int main() 8 { 9 int n, total_time, ...
分类:
其他好文 时间:
2015-10-02 22:28:47
阅读次数:
224
http://www.lydsy.com/JudgeOnline/problem.php?id=1588我的第一颗splay, bottom-up的数组实现。题意就是给你一组数,求每个数与在其前面且与其最相近的数的差值的绝对值。考虑splay二叉搜索树的特性,每新插入一个节点,比它小且最靠近它的数在...
分类:
其他好文 时间:
2015-10-02 20:00:39
阅读次数:
259