Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such tha...
分类:
其他好文 时间:
2015-02-23 16:38:13
阅读次数:
141
In my stochastic processes class, Prof Mike Steele assigned a homework problem to calculate the ruin probabilities for playing a game where you with $...
分类:
其他好文 时间:
2015-02-23 09:36:56
阅读次数:
382
using Dapper;using Dapper.Contrib.Extensions;using System.Data.SqlClient;using System.Configuration;namespace Orm{ public class RecordBase where T ...
Problem:
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
For example,
Given [0,1,0,2,1,...
分类:
移动开发 时间:
2015-02-22 14:39:33
阅读次数:
144
题目链接:http://poj.org/problem?id=1422Consider a town where all the streets are one-way and each street leads from one intersection to another. It is als...
分类:
其他好文 时间:
2015-02-22 13:22:29
阅读次数:
233
A peak element is an element that is greater than its neighbors.
Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.
The array may contain multiple peaks,...
分类:
其他好文 时间:
2015-02-21 21:04:00
阅读次数:
193
如果开发人员在做表设计阶段没有考虑到大表历史数据的维护性,随着数据量越来越大,表就越来越难管理和维护.连创建索引的失败都可能会失败(因为创建索引要利用临时表空间的的排序,当临时表空间不够大创建索引的动作就会报错).如果过滤条件用不到索引,每成功完成一次delete操作就需要全表扫描一次...那么几十GB的大表,情何以堪...?
那么有什么方法可以解决这种问题吗?当然改造生产表是可以的(利用DBM...
分类:
其他好文 时间:
2015-02-20 09:45:55
阅读次数:
157
题意:给出一列数,先排序,再查找学习了sort函数,lower_bound函数sort:可以给任意对象排序(包括自己定义的)(前提是定义好了‘ 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int...
分类:
其他好文 时间:
2015-02-19 13:58:59
阅读次数:
117
今天无聊翻腾刚毕业时的电脑,发现11年在单位实习时的一些练习题及考核试题和答案,现在在此记录一下,方便以后查阅。
考核一:
--1、列出薪金比"SMITH"多的所有雇员
select * from emp where sal > (select sal from emp where ename='SMITH');
--2、找出佣金高于薪金60%的雇员
select...
分类:
数据库 时间:
2015-02-18 17:40:41
阅读次数:
250
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.这道题是要求把有序链表转为二叉搜索树,和之前那道Convert Sorted Ar...
分类:
其他好文 时间:
2015-02-18 08:24:13
阅读次数:
160