This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int max(int a,int b,int c) | |
{ | |
return a>b?(a>c?a:c):(c>b?c:b); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
> File Name: maxSequenceSumSimplest.cpp | |
> Author: | |
> Mail: | |
> Created Time: 2016年10月10日 星期一 11时02分21秒 | |
************************************************************************/ | |
#include<iostream> | |
using namespace std; | |
int maxSequenceSum(const int a[],int N) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct Node; | |
typedef struct Node * ptrToNode; | |
typedef ptrToNode Polynomial; | |
struct Node{ | |
int cofficient; | |
int exponent; | |
ptrToNode next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct Node; | |
typedef struct Node * ptrToNode; | |
typedef ptrToNode List,Position; | |
struct Node | |
{ | |
int element; | |
ptrToNode next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct Node; | |
typedef struct Node * ptrToNode; | |
typedef ptrToNode List,Position; | |
struct Node | |
{ | |
int element; | |
ptrToNode next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
void radixSort(int *arr, int len, int max) | |
{ | |
int buckets[10][10] = {0}; | |
int order[10] = {0}; | |
int n = 1; | |
while (n < max) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <cstring> | |
typedef char ElementType; | |
struct StackRecord; | |
typedef struct StackRecord *Stack; | |
int isEmpty(Stack s); | |
int isFull(Stack s); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <cstring> | |
struct TreeNode; | |
typedef struct TreeNode * ptrToTreeNode; | |
typedef struct ptrToTreeNode Tree; | |
struct TreeNode { | |
char element; | |
Tree left; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct AvlNode; | |
typedef int ElementType; | |
typedef struct AvlNode * Position; | |
typedef Position AvlTree; | |
AvlTree makeEmpty(AvlTree T); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
void compute_prefix(const char *pattern, int next[]) { | |
int i; | |
int j = -1; | |
const int m = strlen(pattern); | |
next[0] = j; |
OlderNewer