码迷,mamicode.com
首页 >  
搜索关键字:order    ( 17944个结果
sql语句聚合等疑难问题收集
数据表中比如有20条数据读取前5条数据select top 5 * from 表 order by id desc读取前5条数据后的5条数据(就是查询前10条记录,取后面5个)select top 5 * from 表 whereid not in (select top 5 id from 表)=...
分类:数据库   时间:2015-03-18 15:50:34    阅读次数:156
poj 2585 Window Pains 暴力枚举排列
题意: 在4*4的格子中有9个窗口,窗口会覆盖它之下的窗口,问是否存在一个窗口放置的顺序使得最后的结果与输入相同。 分析: 在数据规模较小且不需要剪枝的情况下可以暴力(思路清晰代码简单),暴力一般分为枚举子集(for(s=0;s 代码: //poj 2585 //sep9 #include #include using namespace std; int order[10]; in...
分类:Windows程序   时间:2015-03-18 14:05:25    阅读次数:188
毕设过程中的学习 随便写写~
1.sql语句的执行(并非简单的sql语句就可以,见注释)SqlConnection Conn=new SqlConnection(data.strconn); Conn.Open(); string SqlStr="select * from teacher order by teacher...
分类:其他好文   时间:2015-03-18 13:45:14    阅读次数:110
LeetCode – Refresh – Binary Tree Zigzag Level Order Traversal
Made a stupid bug....... When reverse the vector, stop it at mid. Otherwise, it will swap back......Mark!!!!!!!! 1 /** 2 * Definition for binary tree....
分类:其他好文   时间:2015-03-18 10:23:29    阅读次数:120
LeetCode – Refresh – Binary Tree Level Order Traversal
Basic question. Use a queue to store Node, use two numbers to record current level node numbers and next level node numbers. 1 /** 2 * Definition for....
分类:其他好文   时间:2015-03-18 08:58:27    阅读次数:105
LeetCode – Refresh – Binary Tree Pre Order Traversal
Same with inorder.1. recursive: 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeN...
分类:其他好文   时间:2015-03-18 08:58:05    阅读次数:131
LeetCode – Refresh – Binary Tree Post Order Traversal
Still 3 methods:Same with inorder, but post order is a little different. We need to treat it as reverse result of preorder.So we go to right branch fi...
分类:其他好文   时间:2015-03-18 08:57:58    阅读次数:132
LeetCode – Refresh – Binary Tree Level Order Traversal ii
This question is almost same as the previous one.I just use a stack (another vector) of vector to store the level result. Then reverse it. 1 /** 2 * ....
分类:其他好文   时间:2015-03-18 08:56:41    阅读次数:155
poj 3264 Balanced Lineup 区间极值RMQ
题目链接:http://poj.org/problem?id=3264For the daily milking, Farmer John'sNcows (1 ≤N≤ 50,000) always line up in the same order. One day Farmer John deci...
分类:其他好文   时间:2015-03-18 01:06:40    阅读次数:139
[Leetcode]Sort Colors
Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, wh...
分类:其他好文   时间:2015-03-17 23:20:05    阅读次数:140
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!