
C++
文章平均质量分 69
Mark__Zeng
这个作者很懒,什么都没留下…
展开
-
Creat Binary Tree and by means of Postorder and Preorder through the Tree
#define NULL 0 #include "stdio.h" #include "stdlib.h" //二叉链表结点定义 typedef struct tree { int data; struct tree *lchild; struct tree *rchild; }*TREE;// 先序建立二叉树 struct tree *create(struct t原创 2014-07-02 01:14:56 · 525 阅读 · 0 评论 -
map的弱化构造
刚看完c++ primer原创 2014-07-04 16:04:31 · 434 阅读 · 0 评论 -
JAVA – 虚函数、抽象函数、抽象类、接口
JAVA – 虚函数、抽象函数、抽象类、接口 1. Java虚函数 虚函数的存在是为了多态。 C++中普通成员函数加上virtual关键字就成为虚函数 Java中其实没有虚函数的概念,它的普通函数就相当于C++的虚函数,动态绑定是Java的默认行为。如果Java中不希望某个函数具有虚函数特性,可以加上final关键字变成非虚函数 PS: 其实C++和Java在虚函数的观点大同小异转载 2014-07-10 11:30:23 · 522 阅读 · 0 评论 -
Quicksort
#include #include using namespace std; void quicksort(int a[],int start,int end) { if(start<end) { int i = start-1; int j,k; int key = a[end]; for(j=start;j<=end-1;j++) { if (a[j]<=ke原创 2014-09-24 23:35:15 · 472 阅读 · 0 评论 -
函数对象的学习
#include #include #include #include #include using namespace std; template class Sumpower { private: int power; public: Sumpower(int p):power(p){} const T operator()( const T& total,const T&原创 2014-07-01 16:28:34 · 445 阅读 · 0 评论 -
Hackerrank && Network
1.Hackerrank 一个在N个数字里,选K个数字,使得原创 2014-10-20 00:16:11 · 979 阅读 · 0 评论 -
[Leetcode] Maximum Product Subarra
Leetcode—Maximum Product Subarray原创 2014-10-05 17:22:36 · 984 阅读 · 0 评论