void DoEvents(){ MSG msg; // Process existing messages in the application's message queue. // When the queue is empty, do clean up and return...
分类:
其他好文 时间:
2015-07-09 17:32:25
阅读次数:
105
题目:
Implement the following operations of a stack using queues.
push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- Re...
分类:
编程语言 时间:
2015-07-09 14:41:27
阅读次数:
135
Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be on...
分类:
其他好文 时间:
2015-07-09 12:41:17
阅读次数:
170
36 Valid Sudoku链接:https://leetcode.com/problems/valid-sudoku/
问题描述:
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty ce...
分类:
其他好文 时间:
2015-07-08 19:10:38
阅读次数:
131
优先级队列priority_queue
最大值优先级队列、最小值优先级队列
优先级队列适配器 STL priority_queue
用来开发一些特殊的应用。
priority_queue> pq;
priority_queue> pq;
pq.empty()
pq.size()
pq.top()
pq.pop()
pq.push(item)
demo
#include
#...
分类:
其他好文 时间:
2015-07-08 16:30:46
阅读次数:
128
题意:给出个有序不重复数列(可能负数),用缩写法记录这个数列。思路:找每个范围的起始和结束即可。 1 class Solution { 2 public: 3 vector summaryRanges(vector& nums) { 4 if(nums.empty()) ...
分类:
其他好文 时间:
2015-07-08 02:01:36
阅读次数:
161
Implement the following operations of a queue using stacks.
push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.peek() -- Get the front element.empty(...
分类:
其他好文 时间:
2015-07-07 22:55:28
阅读次数:
133
protected void ImageButton7_Click(object sender, ImageClickEventArgs e) { string D_where = string.Empty; if (string.IsNul...
分类:
其他好文 时间:
2015-07-07 19:23:46
阅读次数:
118
string的简单应用
string的基本初始化
std::string s1(“xxxxxxxxx”)
std::string s2=”xx”
std::string s3(s2)
string的对象方法
s1.empty();
s1.size();//返回类型扩展typedef string::size_type ST;
s1[index];//取字符
include 判断字符是...
分类:
编程语言 时间:
2015-07-07 16:51:12
阅读次数:
124
class Queue {public: // Push element x to the back of queue. void push(int x) { while (!s2.empty()) { int val = s2.top(...
分类:
其他好文 时间:
2015-07-07 16:29:08
阅读次数:
101