- 博客(8)
- 收藏
- 关注
原创 笔试|蓝鸽|C++岗
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档文章目录前言2022/4/14 vm一、十六进制字符串转十进制整数二、使用步骤1.引入库2.读入数据总结前言2022/4/14 vm一、十六进制字符串转十进制整数编写一个函数,函数接收一个字符串,是由十六进制数组成的一组字符串,函数的功能是把接到的这组字符串转换成十进制数字.并将十进制数字返回。#include <iostream>using namespace std;// 十六进制字符串的最大长度.
2022-04-14 00:58:08
907
1
原创 6-1 Shortest Path [2]
Write a program to find the weighted shortest distances from any vertex to a given source vertex in a digraph. It is guaranteed that all the weights are positive.Format of functions:void ShortestDis...
2019-12-04 19:42:52
396
原创 实习四 7-1 汉诺塔的非递归实现 (25 分)
7-1 汉诺塔的非递归实现 (25 分)借助堆栈以非递归(循环)方式求解汉诺塔的问题(n, a, b, c),即将N个盘子从起始柱(标记为“a”)通过借助柱(标记为“b”)移动到目标柱(标记为“c”),并保证每个移动符合汉诺塔问题的要求。输入格式:输入为一个正整数N,即起始柱上的盘数。输出格式:每个操作(移动)占一行,按柱1 -> 柱2的格式输出。输入样例:3输出样例:a...
2019-10-09 20:40:21
1294
原创 实习四 6-2 另类堆栈 (15 分)
6-2 另类堆栈 (15 分)在栈的顺序存储实现中,另有一种方法是将Top定义为栈顶的上一个位置。请编写程序实现这种定义下堆栈的入栈、出栈操作。如何判断堆栈为空或者满?函数接口定义:bool Push( Stack S, ElementType X );ElementType Pop( Stack S );其中Stack结构定义如下:typedef int Position;typ...
2019-10-09 20:01:50
2297
原创 实习四 6-1 Two Stacks In One Array (20 分)
**6-1 Two Stacks In One Array两个栈在一个排列里 (20 分)**Write routines to implement(实现) two stacks using only one array. Your stack routines should not declare(宣告、表明) an overflow(溢出) unless every slot in the...
2019-10-09 19:52:37
600
原创 seqlist 链表
#include "stdio.h"#include "stdlib.h"typedef struct {int elem[100];int last;}SeqList;int InitSeqList(SeqList *L);int printSeqList(SeqList *L);int GetdataSeqList(SeqList*L,int i);int LocateSe...
2019-09-08 16:47:08
355
原创 实验四 指针
实验四 指针#include<stdio.h>#include<string.h>int my_strlen(char str[]);int my_strcmp(char str1[],char str2[]);void swap(int *p1,int *p2) ; void sortnum(int *a,int n);void sortstr(char s...
2019-07-16 15:26:30
150
原创 ppt编程题——函数 (输出杨辉三角未写)
#include<stdio.h>int fib(int n);void move(char from,char to);void hanoi(int n,char one,char two,char three);void er(int n);double fac(double n);void mws(int n);int main(){int n;scanf("...
2019-07-12 15:47:33
155
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人