Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1.....
分类:
其他好文 时间:
2015-06-17 23:06:50
阅读次数:
189
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl...
分类:
其他好文 时间:
2015-06-17 14:48:01
阅读次数:
110
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他好文 时间:
2015-06-17 13:18:18
阅读次数:
107
Description:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Code: 1 string addBinary(string...
分类:
其他好文 时间:
2015-06-17 13:07:29
阅读次数:
114
问题描述:
【项目1-用二进制文件处理学生成绩】
(1)定义学生类,其中包含学号、姓名、C++课、高数和英语成绩及总分数据成员,成员函数根据需要确定。
(2)读入学生的成绩,并求出总分,用对象数组进行存储。ASCII文件score.dat中保存的是100名学生的学号、姓名和C++课、高数和英语成绩。
(3)将所有数据保存到一个二进制文件binary_score.dat中,最后通过键盘...
分类:
其他好文 时间:
2015-06-17 09:44:25
阅读次数:
208
1、阅读并运行下面的两个程序,分别用记事本和二进制文件阅读器(请自行下载Binary Viewer等程序,或者用DOS中的Debug程序,并百度其用法)。查看其内容,并理解文件存储的原理。
(1)
#include
#include
#include
using namespace std;
int main( )
{
int a;
ofstream outfile("f...
分类:
其他好文 时间:
2015-06-17 09:33:57
阅读次数:
150
3、阅读下面的程序,指出其功能,体会seekg()、tellg()等函数的功能及其用法
(1)
#include
#include
using namespace std;
const char * filename = "a.txt";
int main ()
{
long l,m;
ifstream file (filename, ios::in|ios::binary)...
分类:
其他好文 时间:
2015-06-17 09:31:41
阅读次数:
123
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matr...
分类:
其他好文 时间:
2015-06-17 08:13:14
阅读次数:
112
完全没有想法实际上是in order traversal而已public class BSTIterator { public TreeNode crt; public Stack st = new Stack(); public BSTIterator(TreeNode ...
分类:
其他好文 时间:
2015-06-17 07:06:12
阅读次数:
90
1、MySQL的DDL语句MySQL中字符的大小写SQL关键字及函数名不区字符大小写;数据库、表、索引及视图的名称是否区分大小写取决于低层的OS及FS;存储过程、存储函数及事件调度器不区分字符大小写;但触发器区分;表别名不区分大小写;字段中字符数据,类型为binary、blog、varbinar..
分类:
其他好文 时间:
2015-06-17 02:06:17
阅读次数:
167