
常见算法题
TS1130
这个作者很懒,什么都没留下…
展开
-
数字转人民币
数字转换人民币大写形式:银行、单位和个人填写的各种票据和结算凭证需要将数字金额写成人民币大写形式,它的规则主要有以下几条:1、数字和单位使用壹、贰、叁、肆、伍、陆、柒、捌、玖、拾、佰、仟、万、亿、元、角、分、零、整等字样,不能使用其他汉字;2、中文大写金额数字到"元"为止的,在"元"之后、应写"整"字;在"角"之后,可以不写"整"字;大写金额数字有"分"的,"分"后面不写"整"字;3、数字...原创 2019-09-12 14:09:02 · 502 阅读 · 0 评论 -
KMP
#include <stdio.h>#include <string.h>void get_next(char T[], int next[]) { int i = 1, j = 3, k; next[1] = 0; next[2] = 1; while(j <= T[0]) { k = next[j-1]; ...原创 2019-09-12 14:41:10 · 140 阅读 · 0 评论 -
中缀表达式转后缀表达式
#include <stdio.h>int main() { char c; char arr[200]; int i = -1, n = 0; while ((c = getchar()) != '\n' && n < 200) { n++; if(c == '+' || c == '-' |...原创 2019-09-12 16:50:37 · 181 阅读 · 0 评论 -
二叉树前序中序输出后序
#include <stdio.h>#include <string.h>#include <malloc.h>typedef struct BNodeTree { char data; struct BNodeTree* left; struct BNodeTree* right;}BNodeTree;BNodeTree*...原创 2019-09-13 17:58:07 · 348 阅读 · 0 评论 -
循环链表
#include <stdio.h>#include <string.h>#include <malloc.h>#include <stdbool.h>typedef struct DuLNode { int data; struct DuLNode *prior; struct DuLNode *next;} D...原创 2019-09-14 19:00:24 · 290 阅读 · 0 评论